diff --git a/.fern/metadata.json b/.fern/metadata.json new file mode 100644 index 000000000..a5d9ea6d1 --- /dev/null +++ b/.fern/metadata.json @@ -0,0 +1,16 @@ +{ + "cliVersion": "3.39.2", + "generatorName": "fernapi/fern-java-sdk", + "generatorVersion": "3.24.0", + "generatorConfig": { + "publish-to": "central", + "generate-unknown-as-json-node": true, + "base-api-exception-class-name": "ApiError", + "base-exception-class-name": "MergeException", + "disable-required-property-builder-checks": true, + "object-query-parameters": true, + "package-layout": "flat", + "default-timeout-in-seconds": 120, + "enable-forward-compatible-enums": true + } +} \ No newline at end of file diff --git a/.mock/accounting_v3.yml b/.mock/accounting_v3.yml deleted file mode 100644 index 455d27ce6..000000000 --- a/.mock/accounting_v3.yml +++ /dev/null @@ -1,32829 +0,0 @@ -openapi: 3.0.3 -info: - title: Merge Accounting API - version: '1.0' - description: The unified API for building rich integrations with multiple Accounting - & Finance platforms. - contact: - name: Merge Team - url: https://www.merge.dev/ - email: hello@merge.dev -paths: - /accounting/v1/account-details: - get: - operationId: account_details_retrieve - description: Get details for a linked account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - account-details - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AccountDetails' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/account-token/{public_token}: - get: - operationId: account_token_retrieve - description: Returns the account token for the end user with the provided public - token. - parameters: - - in: path - name: public_token - schema: - type: string - required: true - tags: - - account-token - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AccountToken' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/accounting-periods: - get: - operationId: accounting_periods_list - description: Returns a list of `AccountingPeriod` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - accounting-periods - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAccountingPeriodList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/accounting-periods/{id}: - get: - operationId: accounting_periods_retrieve - description: Returns an `AccountingPeriod` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - accounting-periods - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AccountingPeriod' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/accounts: - get: - operationId: accounts_list - description: Returns a list of `Account` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: account_type - schema: - type: string - description: If provided, will only return accounts with the passed in enum. - - in: query - name: classification - schema: - type: string - nullable: true - enum: - - '' - - ASSET - - EQUITY - - EXPENSE - - LIABILITY - - - - REVENUE - description: If provided, will only return accounts with this classification. - - in: query - name: company_id - schema: - type: string - description: If provided, will only return accounts for this company. - examples: - CompanyId: - summary: company_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany: - value: company - summary: Expand Company - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: name - schema: - type: string - nullable: true - description: If provided, will only return Accounts with this name. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - classification - - classification,status - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesClassification,Status: - value: classification,status - summary: Original Enum Values Classification, Status - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - classification - - classification,status - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesClassification,Status: - value: classification,status - summary: Original Enum Values Classification, Status - - in: query - name: status - schema: - type: string - nullable: true - enum: - - '' - - ACTIVE - - INACTIVE - - - - PENDING - description: If provided, will only return accounts with this status. - tags: - - accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAccountList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: accounts_create - description: Creates an `Account` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - accounts - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AccountEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/AccountEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/AccountEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/AccountResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/accounts/{id}: - get: - operationId: accounts_retrieve - description: Returns an `Account` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany: - value: company - summary: Expand Company - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - classification - - classification,status - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesClassification,Status: - value: classification,status - summary: Original Enum Values Classification, Status - - in: query - name: show_enum_origins - schema: - type: string - enum: - - classification - - classification,status - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesClassification,Status: - value: classification,status - summary: Original Enum Values Classification, Status - tags: - - accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Account' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/accounts/meta/post: - get: - operationId: accounts_meta_post_retrieve - description: Returns metadata for `Account` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/addresses/{id}: - get: - operationId: addresses_retrieve - description: Returns an `Address` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesType: - value: type - summary: Original Enum Values Type - - in: query - name: show_enum_origins - schema: - type: string - enum: - - type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesType: - value: type - summary: Original Enum Values Type - tags: - - addresses - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Address' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/async-passthrough: - post: - operationId: async_passthrough_create - description: Asynchronously pull data from an endpoint not currently supported - by Merge. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - async-passthrough - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AsyncPassthroughReciept' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/async-passthrough/{async_passthrough_receipt_id}: - get: - operationId: async_passthrough_retrieve - description: Retrieves data from earlier async-passthrough POST request - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: async_passthrough_receipt_id - schema: - type: string - format: uuid - required: true - tags: - - async-passthrough - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/RemoteResponse' - - type: string - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/async-tasks/{id}: - get: - operationId: async_tasks_retrieve - description: Returns an `AsyncPostTask` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - required: true - tags: - - async-tasks - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AsyncPostTask' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/attachments: - get: - operationId: attachments_list - description: Returns a list of `AccountingAttachment` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: company_id - schema: - type: string - description: If provided, will only return accounting attachments for this - company. - examples: - CompanyId: - summary: company_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - attachments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAccountingAttachmentList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: attachments_create - description: Creates an `AccountingAttachment` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - attachments - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AccountingAttachmentEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/AccountingAttachmentEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/AccountingAttachmentEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/AccountingAttachmentResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/attachments/{id}: - get: - operationId: attachments_retrieve - description: Returns an `AccountingAttachment` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - attachments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AccountingAttachment' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/attachments/meta/post: - get: - operationId: attachments_meta_post_retrieve - description: Returns metadata for `AccountingAttachment` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - attachments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/audit-trail: - get: - operationId: audit_trail_list - description: Gets a list of audit trail events. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_date - schema: - type: string - description: If included, will only include audit trail events that occurred - before this time - - in: query - name: event_type - schema: - type: string - description: 'If included, will only include events with the given event type. - Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, - `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, - `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, - `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, - `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, - `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, - `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, - `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, - `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, - `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`' - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: start_date - schema: - type: string - description: If included, will only include audit trail events that occurred - after this time - - in: query - name: user_email - schema: - type: string - description: If provided, this will return events associated with the specified - user email. Please note that the email address reflects the user's email - at the time of the event, and may not be their current email. - tags: - - audit-trail - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAuditLogEventList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/available-actions: - get: - operationId: available_actions_retrieve - description: Returns a list of models and actions available for an account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - available-actions - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AvailableActions' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/balance-sheets: - get: - operationId: balance_sheets_list - description: Returns a list of `BalanceSheet` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: company_id - schema: - type: string - description: If provided, will only return balance sheets for this company. - examples: - CompanyId: - summary: company_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany: - value: company - summary: Expand Company - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - balance-sheets - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedBalanceSheetList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/balance-sheets/{id}: - get: - operationId: balance_sheets_retrieve - description: Returns a `BalanceSheet` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany: - value: company - summary: Expand Company - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - balance-sheets - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/BalanceSheet' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/bank-feed-accounts: - get: - operationId: bank_feed_accounts_list - description: Returns a list of `BankFeedAccount` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - bank-feed-accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedBankFeedAccountList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - post: - operationId: bank_feed_accounts_create - description: Creates a `BankFeedAccount` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - bank-feed-accounts - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BankFeedAccountEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/BankFeedAccountEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/BankFeedAccountEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/BankFeedAccountResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/bank-feed-accounts/{id}: - get: - operationId: bank_feed_accounts_retrieve - description: Returns a `BankFeedAccount` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - bank-feed-accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/BankFeedAccount' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/bank-feed-accounts/meta/post: - get: - operationId: bank_feed_accounts_meta_post_retrieve - description: Returns metadata for `BankFeedAccount` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - bank-feed-accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/bank-feed-transactions: - get: - operationId: bank_feed_transactions_list - description: Returns a list of `BankFeedTransaction` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - bank_feed_account - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandBankFeedAccount: - value: bank_feed_account - summary: Expand Bank_feed_account - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_processed - schema: - type: boolean - description: If provided, will only return bank feed transactions with this - is_processed value - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - bank-feed-transactions - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedBankFeedTransactionList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - post: - operationId: bank_feed_transactions_create - description: Creates a `BankFeedTransaction` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - bank-feed-transactions - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BankFeedTransactionEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/BankFeedTransactionEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/BankFeedTransactionEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/BankFeedTransactionResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/bank-feed-transactions/{id}: - get: - operationId: bank_feed_transactions_retrieve - description: Returns a `BankFeedTransaction` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - bank_feed_account - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandBankFeedAccount: - value: bank_feed_account - summary: Expand Bank_feed_account - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - bank-feed-transactions - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/BankFeedTransaction' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/bank-feed-transactions/meta/post: - get: - operationId: bank_feed_transactions_meta_post_retrieve - description: Returns metadata for `BankFeedTransaction` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - bank-feed-transactions - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/cash-flow-statements: - get: - operationId: cash_flow_statements_list - description: Returns a list of `CashFlowStatement` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: company_id - schema: - type: string - description: If provided, will only return cash flow statements for this company. - examples: - CompanyId: - summary: company_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany: - value: company - summary: Expand Company - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - cash-flow-statements - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedCashFlowStatementList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/cash-flow-statements/{id}: - get: - operationId: cash_flow_statements_retrieve - description: Returns a `CashFlowStatement` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany: - value: company - summary: Expand Company - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - cash-flow-statements - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CashFlowStatement' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/company-info: - get: - operationId: company_info_list - description: Returns a list of `CompanyInfo` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - addresses - - phone_numbers - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandAddresses,PhoneNumbers: - value: addresses,phone_numbers - summary: Expand Addresses, Phone_numbers - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - company-info - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedCompanyInfoList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/company-info/{id}: - get: - operationId: company_info_retrieve - description: Returns a `CompanyInfo` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - addresses - - phone_numbers - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandAddresses,PhoneNumbers: - value: addresses,phone_numbers - summary: Expand Addresses, Phone_numbers - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - company-info - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CompanyInfo' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/contacts: - get: - operationId: contacts_list - description: Returns a list of `Contact` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: company_id - schema: - type: string - description: If provided, will only return contacts for this company. - examples: - CompanyId: - summary: company_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: email_address - schema: - type: string - nullable: true - description: If provided, will only return Contacts that match this email. - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - addresses - - company - - phone_numbers - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandAddresses,PhoneNumbers,Company: - value: addresses,phone_numbers,company - summary: Expand Addresses, Phone_numbers, Company - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_customer - schema: - type: string - description: If provided, will only return Contacts that are denoted as customers. - - in: query - name: is_supplier - schema: - type: string - description: If provided, will only return Contacts that are denoted as suppliers. - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: name - schema: - type: string - nullable: true - description: If provided, will only return Contacts that match this name. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: status - schema: - type: string - nullable: true - enum: - - '' - - ACTIVE - - ARCHIVED - - - description: If provided, will only return Contacts that match this status. - tags: - - contacts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedContactList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: contacts_create - description: Creates a `Contact` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - contacts - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ContactEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/ContactEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/ContactEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/ContactResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/contacts/{id}: - get: - operationId: contacts_retrieve - description: Returns a `Contact` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - addresses - - company - - phone_numbers - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandAddresses,PhoneNumbers,Company: - value: addresses,phone_numbers,company - summary: Expand Addresses, Phone_numbers, Company - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - tags: - - contacts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Contact' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/contacts/meta/post: - get: - operationId: contacts_meta_post_retrieve - description: Returns metadata for `Contact` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - contacts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/contacts/remote-field-classes: - get: - operationId: contacts_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - contacts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/credit-notes: - get: - operationId: credit_notes_list - description: Returns a list of `CreditNote` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: company_id - schema: - type: string - description: If provided, will only return credit notes for this company. - examples: - CompanyId: - summary: company_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - accounting_period - - applied_payments - - company - - contact - - line_items - - payments - - tracking_categories - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandPayments,AppliedPayments,LineItems,TrackingCategories,Contact,Company,AccountingPeriod: - value: - payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period - summary: Expand Payments, Applied_payments, Line_items, Tracking_categories, - Contact, Company, Accounting_period - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - status - - status,type - - type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus,Type: - value: status,type - summary: Original Enum Values Status, Type - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - - status,type - - type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus,Type: - value: status,type - summary: Original Enum Values Status, Type - - in: query - name: transaction_date_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects created after this datetime. - - in: query - name: transaction_date_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects created before this datetime. - tags: - - credit-notes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedCreditNoteList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: credit_notes_create - description: Creates a `CreditNote` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - credit-notes - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreditNoteEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/CreditNoteEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/CreditNoteEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/CreditNoteResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/credit-notes/{id}: - get: - operationId: credit_notes_retrieve - description: Returns a `CreditNote` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - accounting_period - - applied_payments - - company - - contact - - line_items - - payments - - tracking_categories - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandPayments,AppliedPayments,LineItems,TrackingCategories,Contact,Company,AccountingPeriod: - value: - payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period - summary: Expand Payments, Applied_payments, Line_items, Tracking_categories, - Contact, Company, Accounting_period - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - status - - status,type - - type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus,Type: - value: status,type - summary: Original Enum Values Status, Type - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - - status,type - - type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus,Type: - value: status,type - summary: Original Enum Values Status, Type - tags: - - credit-notes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CreditNote' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/credit-notes/meta/post: - get: - operationId: credit_notes_meta_post_retrieve - description: Returns metadata for `CreditNote` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - credit-notes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/default-scopes: - get: - operationId: default_scopes_retrieve - description: Get the default permissions for Merge Common Models and fields - across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - tags: - - scopes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/delete-account: - post: - operationId: delete_account_delete - description: Delete a linked account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - delete-account - security: - - tokenAuth: [] - responses: - '200': - description: No response body - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/employees: - get: - operationId: employees_list - description: Returns a list of `Employee` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany: - value: company - summary: Expand Company - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - employees - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedEmployeeList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/employees/{id}: - get: - operationId: employees_retrieve - description: Returns an `Employee` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany: - value: company - summary: Expand Company - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - employees - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Employee' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/expenses: - get: - operationId: expenses_list - description: Returns a list of `Expense` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: company_id - schema: - type: string - description: If provided, will only return expenses for this company. - examples: - CompanyId: - summary: company_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - accounting_period - - company - - contact - - employee - - tracking_categories - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandTrackingCategories,Account,Contact,Company,Employee,AccountingPeriod: - value: tracking_categories,account,contact,company,employee,accounting_period - summary: Expand Tracking_categories, Account, Contact, Company, Employee, - Accounting_period - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: transaction_date_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects created after this datetime. - - in: query - name: transaction_date_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects created before this datetime. - tags: - - expenses - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedExpenseList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: expenses_create - description: Creates an `Expense` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - expenses - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ExpenseEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/ExpenseEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/ExpenseEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/ExpenseResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/expenses/{id}: - get: - operationId: expenses_retrieve - description: Returns an `Expense` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - accounting_period - - company - - contact - - employee - - tracking_categories - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandTrackingCategories,Account,Contact,Company,Employee,AccountingPeriod: - value: tracking_categories,account,contact,company,employee,accounting_period - summary: Expand Tracking_categories, Account, Contact, Company, Employee, - Accounting_period - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - expenses - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Expense' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/expenses/lines/remote-field-classes: - get: - operationId: expenses_lines_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - expenses - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/expenses/meta/post: - get: - operationId: expenses_meta_post_retrieve - description: Returns metadata for `Expense` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - expenses - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/expenses/remote-field-classes: - get: - operationId: expenses_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - expenses - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/field-mappings: - get: - operationId: field_mappings_retrieve - description: Get all Field Mappings for this Linked Account. Field Mappings - are mappings between third-party Remote Fields and user defined Merge fields. - [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: exclude_remote_field_metadata - schema: - type: boolean - description: If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` - will be null). This will increase the speed of the request since these fields - require some calculations. - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingApiInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: field_mappings_create - description: Create new Field Mappings that will be available after the next - scheduled sync. This will cause the next sync for this Linked Account to sync - **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: exclude_remote_field_metadata - schema: - type: boolean - description: If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` - will be null). This will increase the speed of the request since these fields - require some calculations. - tags: - - field-mapping - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/field-mappings/{field_mapping_id}: - patch: - operationId: field_mappings_partial_update - description: Create or update existing Field Mappings for a Linked Account. - Changes will be reflected after the next scheduled sync. This will cause the - next sync for this Linked Account to sync **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: field_mapping_id - schema: - type: string - format: uuid - required: true - tags: - - field-mapping - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - delete: - operationId: field_mappings_destroy - description: Deletes Field Mappings for a Linked Account. All data related to - this Field Mapping will be deleted and these changes will be reflected after - the next scheduled sync. This will cause the next sync for this Linked Account - to sync **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: field_mapping_id - schema: - type: string - format: uuid - required: true - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '204': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/general-ledger-transactions: - get: - operationId: general_ledger_transactions_list - description: Returns a list of `GeneralLedgerTransaction` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: company_id - schema: - type: string - description: If provided, will only return general ledger transactions for - this company. - examples: - CompanyId: - summary: company_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - accounting_period - - company - - general_ledger_transaction_lines - - tracking_categories - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandTrackingCategories,GeneralLedgerTransactionLines,Company,AccountingPeriod: - value: tracking_categories,general_ledger_transaction_lines,company,accounting_period - summary: Expand Tracking_categories, General_ledger_transaction_lines, - Company, Accounting_period - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: posted_date_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects posted after this datetime. - - in: query - name: posted_date_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects posted before this datetime. - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - general-ledger-transactions - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedGeneralLedgerTransactionList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/general-ledger-transactions/{id}: - get: - operationId: general_ledger_transactions_retrieve - description: Returns a `GeneralLedgerTransaction` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - accounting_period - - company - - general_ledger_transaction_lines - - tracking_categories - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandTrackingCategories,GeneralLedgerTransactionLines,Company,AccountingPeriod: - value: tracking_categories,general_ledger_transaction_lines,company,accounting_period - summary: Expand Tracking_categories, General_ledger_transaction_lines, - Company, Accounting_period - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - general-ledger-transactions - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/GeneralLedgerTransaction' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/generate-key: - post: - operationId: generate_key_create - description: Create a remote key. - tags: - - generate-key - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKey' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/income-statements: - get: - operationId: income_statements_list - description: Returns a list of `IncomeStatement` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: company_id - schema: - type: string - description: If provided, will only return income statements for this company. - examples: - CompanyId: - summary: company_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany: - value: company - summary: Expand Company - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - income-statements - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedIncomeStatementList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/income-statements/{id}: - get: - operationId: income_statements_retrieve - description: Returns an `IncomeStatement` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany: - value: company - summary: Expand Company - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - income-statements - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/IncomeStatement' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/invoices: - get: - operationId: invoices_list - description: Returns a list of `Invoice` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: company_id - schema: - type: string - description: If provided, will only return invoices for this company. - examples: - CompanyId: - summary: company_id - - in: query - name: contact_id - schema: - type: string - description: If provided, will only return invoices for this contact. - examples: - ContactId: - summary: contact_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - accounting_period - - applied_credit_notes - - applied_payments - - applied_vendor_credits - - company - - contact - - employee - - line_items - - payment_term - - payments - - purchase_orders - - tracking_categories - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ? ExpandPayments,AppliedPayments,LineItems,TrackingCategories,PurchaseOrders,AppliedCreditNotes,AppliedVendorCredits,Contact,Company,Employee,AccountingPeriod,PaymentTerm - : value: - payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term - summary: Expand Payments, Applied_payments, Line_items, Tracking_categories, - Purchase_orders, Applied_credit_notes, Applied_vendor_credits, Contact, - Company, Employee, Accounting_period, Payment_term - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: issue_date_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects created after this datetime. - - in: query - name: issue_date_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects created before this datetime. - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: number - schema: - type: string - nullable: true - description: If provided, will only return Invoices with this number. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesType: - value: type - summary: Original Enum Values Type - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesType: - value: type - summary: Original Enum Values Type - - in: query - name: status - schema: - type: string - nullable: true - enum: - - DRAFT - - OPEN - - PAID - - PARTIALLY_PAID - - SUBMITTED - - VOID - description: |- - If provided, will only return Invoices with this status. - - * `PAID` - PAID - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `PARTIALLY_PAID` - PARTIALLY_PAID - * `OPEN` - OPEN - * `VOID` - VOID - - in: query - name: type - schema: - type: string - nullable: true - enum: - - ACCOUNTS_PAYABLE - - ACCOUNTS_RECEIVABLE - description: |- - If provided, will only return Invoices with this type. - - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - tags: - - invoices - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedInvoiceList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: invoices_create - description: "Creates an `Invoice` object with the given values.\n \ - \ Including a `PurchaseOrder` id in the `purchase_orders` property will - generate an Accounts Payable Invoice from the specified Purchase Order(s).\n\ - \ " - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - invoices - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InvoiceEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/InvoiceEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/InvoiceEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/InvoiceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/invoices/{id}: - get: - operationId: invoices_retrieve - description: Returns an `Invoice` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - accounting_period - - applied_credit_notes - - applied_payments - - applied_vendor_credits - - company - - contact - - employee - - line_items - - payment_term - - payments - - purchase_orders - - tracking_categories - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ? ExpandPayments,AppliedPayments,LineItems,TrackingCategories,PurchaseOrders,AppliedCreditNotes,AppliedVendorCredits,Contact,Company,Employee,AccountingPeriod,PaymentTerm - : value: - payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term - summary: Expand Payments, Applied_payments, Line_items, Tracking_categories, - Purchase_orders, Applied_credit_notes, Applied_vendor_credits, Contact, - Company, Employee, Accounting_period, Payment_term - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesType: - value: type - summary: Original Enum Values Type - - in: query - name: show_enum_origins - schema: - type: string - enum: - - type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesType: - value: type - summary: Original Enum Values Type - tags: - - invoices - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Invoice' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - patch: - operationId: invoices_partial_update - description: Updates an `Invoice` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - invoices - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedInvoiceEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedInvoiceEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedInvoiceEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/InvoiceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/invoices/line-items/remote-field-classes: - get: - operationId: invoices_line_items_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - invoices - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/invoices/meta/patch/{id}: - get: - operationId: invoices_meta_patch_retrieve - description: Returns metadata for `Invoice` PATCHs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - tags: - - invoices - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-patch: META_PATCH - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/invoices/meta/post: - get: - operationId: invoices_meta_post_retrieve - description: Returns metadata for `Invoice` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - invoices - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/invoices/remote-field-classes: - get: - operationId: invoices_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - invoices - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/issues: - get: - operationId: issues_list - description: Gets all issues for Organization. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: account_token - schema: - type: string - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_date - schema: - type: string - description: If included, will only include issues whose most recent action - occurred before this time - - in: query - name: end_user_organization_name - schema: - type: string - - in: query - name: first_incident_time_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose first incident time - was after this datetime. - - in: query - name: first_incident_time_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose first incident time - was before this datetime. - - in: query - name: include_muted - schema: - type: string - description: If true, will include muted issues - - in: query - name: integration_name - schema: - type: string - - in: query - name: last_incident_time_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose last incident time - was after this datetime. - - in: query - name: last_incident_time_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose last incident time - was before this datetime. - - in: query - name: linked_account_id - schema: - type: string - description: If provided, will only include issues pertaining to the linked - account passed in. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: start_date - schema: - type: string - description: If included, will only include issues whose most recent action - occurred after this time - - in: query - name: status - schema: - type: string - enum: - - ONGOING - - RESOLVED - description: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - tags: - - issues - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedIssueList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/issues/{id}: - get: - operationId: issues_retrieve - description: Get a specific issue. - parameters: - - in: path - name: id - schema: - type: string - format: uuid - required: true - tags: - - issues - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Issue' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/items: - get: - operationId: items_list - description: Returns a list of `Item` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: company_id - schema: - type: string - description: If provided, will only return items for this company. - examples: - CompanyId: - summary: company_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - - purchase_account - - purchase_tax_rate - - sales_account - - sales_tax_rate - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandPurchaseAccount,SalesAccount,Company,SalesTaxRate,PurchaseTaxRate: - value: purchase_account,sales_account,company,sales_tax_rate,purchase_tax_rate - summary: Expand Purchase_account, Sales_account, Company, Sales_tax_rate, - Purchase_tax_rate - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - tags: - - items - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedItemList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: items_create - description: Creates an `Item` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - items - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ItemEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/ItemEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/ItemEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/ItemResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/items/{id}: - get: - operationId: items_retrieve - description: Returns an `Item` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - - purchase_account - - purchase_tax_rate - - sales_account - - sales_tax_rate - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandPurchaseAccount,SalesAccount,Company,SalesTaxRate,PurchaseTaxRate: - value: purchase_account,sales_account,company,sales_tax_rate,purchase_tax_rate - summary: Expand Purchase_account, Sales_account, Company, Sales_tax_rate, - Purchase_tax_rate - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - tags: - - items - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Item' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - patch: - operationId: items_partial_update - description: Updates an `Item` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - items - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedItemEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedItemEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedItemEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ItemResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/items/meta/patch/{id}: - get: - operationId: items_meta_patch_retrieve - description: Returns metadata for `Item` PATCHs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - tags: - - items - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-patch: META_PATCH - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/items/meta/post: - get: - operationId: items_meta_post_retrieve - description: Returns metadata for `Item` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - items - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/journal-entries: - get: - operationId: journal_entries_list - description: Returns a list of `JournalEntry` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: company_id - schema: - type: string - description: If provided, will only return journal entries for this company. - examples: - CompanyId: - summary: company_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - accounting_period - - applied_payments - - company - - lines - - payments - - tracking_categories - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandLines,Payments,AppliedPayments,TrackingCategories,Company,AccountingPeriod: - value: lines,payments,applied_payments,tracking_categories,company,accounting_period - summary: Expand Lines, Payments, Applied_payments, Tracking_categories, - Company, Accounting_period - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: transaction_date_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects created after this datetime. - - in: query - name: transaction_date_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects created before this datetime. - tags: - - journal-entries - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedJournalEntryList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: journal_entries_create - description: Creates a `JournalEntry` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - journal-entries - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/JournalEntryEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/JournalEntryEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/JournalEntryEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/JournalEntryResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/journal-entries/{id}: - get: - operationId: journal_entries_retrieve - description: Returns a `JournalEntry` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - accounting_period - - applied_payments - - company - - lines - - payments - - tracking_categories - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandLines,Payments,AppliedPayments,TrackingCategories,Company,AccountingPeriod: - value: lines,payments,applied_payments,tracking_categories,company,accounting_period - summary: Expand Lines, Payments, Applied_payments, Tracking_categories, - Company, Accounting_period - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - journal-entries - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/JournalEntry' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/journal-entries/lines/remote-field-classes: - get: - operationId: journal_entries_lines_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - journal-entries - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/journal-entries/meta/post: - get: - operationId: journal_entries_meta_post_retrieve - description: Returns metadata for `JournalEntry` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - journal-entries - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/journal-entries/remote-field-classes: - get: - operationId: journal_entries_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - journal-entries - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/link-token: - post: - operationId: link_token_create - description: Creates a link token to be used when linking a new end user. - tags: - - link-token - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LinkToken' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/linked-account-scopes: - get: - operationId: linked_account_scopes_retrieve - description: Get all available permissions for Merge Common Models and fields - for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - scopes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: linked_account_scopes_create - description: Update permissions for any Common Model or field for a single Linked - Account. Any Scopes not set in this POST request will inherit the default - Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - scopes - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/linked-accounts: - get: - operationId: linked_accounts_list - description: List linked accounts for your organization. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: category - schema: - type: string - nullable: true - enum: - - accounting - - ats - - crm - - filestorage - - hris - - mktg - - ticketing - description: |- - Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` - - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_user_email_address - schema: - type: string - description: If provided, will only return linked accounts associated with - the given email address. - - in: query - name: end_user_organization_name - schema: - type: string - description: If provided, will only return linked accounts associated with - the given organization name. - - in: query - name: end_user_origin_id - schema: - type: string - description: If provided, will only return linked accounts associated with - the given origin ID. - - in: query - name: end_user_origin_ids - schema: - type: string - description: Comma-separated list of EndUser origin IDs, making it possible - to specify multiple EndUsers at once. - - in: query - name: id - schema: - type: string - format: uuid - - in: query - name: ids - schema: - type: string - description: Comma-separated list of LinkedAccount IDs, making it possible - to specify multiple LinkedAccounts at once. - - in: query - name: include_duplicates - schema: - type: boolean - description: If `true`, will include complete production duplicates of the - account specified by the `id` query parameter in the response. `id` must - be for a complete production linked account. - - in: query - name: integration_name - schema: - type: string - description: If provided, will only return linked accounts associated with - the given integration name. - - in: query - name: is_test_account - schema: - type: string - description: If included, will only include test linked accounts. If not included, - will only include non-test linked accounts. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: status - schema: - type: string - description: 'Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, - `RELINK_NEEDED`' - tags: - - linked-accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAccountDetailsAndActionsList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/passthrough: - post: - operationId: passthrough_create - description: Pull data from an endpoint not currently supported by Merge. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - passthrough - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/payment-methods: - get: - operationId: payment_methods_list - description: Returns a list of `PaymentMethod` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - payment-methods - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedPaymentMethodList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/payment-methods/{id}: - get: - operationId: payment_methods_retrieve - description: Returns a `PaymentMethod` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - payment-methods - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentMethod' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/payment-terms: - get: - operationId: payment_terms_list - description: Returns a list of `PaymentTerm` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany: - value: company - summary: Expand Company - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - payment-terms - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedPaymentTermList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/payment-terms/{id}: - get: - operationId: payment_terms_retrieve - description: Returns a `PaymentTerm` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany: - value: company - summary: Expand Company - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - payment-terms - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentTerm' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/payments: - get: - operationId: payments_list - description: Returns a list of `Payment` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: account_id - schema: - type: string - description: If provided, will only return payments for this account. - examples: - AccountId: - summary: account_id - - in: query - name: company_id - schema: - type: string - description: If provided, will only return payments for this company. - examples: - CompanyId: - summary: company_id - - in: query - name: contact_id - schema: - type: string - description: If provided, will only return payments for this contact. - examples: - ContactId: - summary: contact_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - accounting_period - - applied_to_lines - - company - - contact - - payment_method - - tracking_categories - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandTrackingCategories,AppliedToLines,Contact,Account,Company,AccountingPeriod,PaymentMethod: - value: - tracking_categories,applied_to_lines,contact,account,company,accounting_period,payment_method - summary: Expand Tracking_categories, Applied_to_lines, Contact, Account, - Company, Accounting_period, Payment_method - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: transaction_date_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects created after this datetime. - - in: query - name: transaction_date_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects created before this datetime. - tags: - - payments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedPaymentList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: payments_create - description: Creates a `Payment` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - payments - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PaymentEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PaymentEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/payments/{id}: - get: - operationId: payments_retrieve - description: Returns a `Payment` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - accounting_period - - applied_to_lines - - company - - contact - - payment_method - - tracking_categories - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandTrackingCategories,AppliedToLines,Contact,Account,Company,AccountingPeriod,PaymentMethod: - value: - tracking_categories,applied_to_lines,contact,account,company,accounting_period,payment_method - summary: Expand Tracking_categories, Applied_to_lines, Contact, Account, - Company, Accounting_period, Payment_method - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - payments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Payment' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - patch: - operationId: payments_partial_update - description: Updates a `Payment` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - payments - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedPaymentEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedPaymentEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedPaymentEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/payments/line-items/remote-field-classes: - get: - operationId: payments_line_items_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - payments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/payments/meta/patch/{id}: - get: - operationId: payments_meta_patch_retrieve - description: Returns metadata for `Payment` PATCHs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - tags: - - payments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-patch: META_PATCH - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/payments/meta/post: - get: - operationId: payments_meta_post_retrieve - description: Returns metadata for `Payment` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - payments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/payments/remote-field-classes: - get: - operationId: payments_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - payments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/phone-numbers/{id}: - get: - operationId: phone_numbers_retrieve - description: Returns an `AccountingPhoneNumber` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - phone-numbers - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AccountingPhoneNumber' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/projects: - get: - operationId: projects_list - description: Returns a list of `Project` objects. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - - contact - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany,Contact: - value: company,contact - summary: Expand Company, Contact - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - projects - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedProjectList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/projects/{id}: - get: - operationId: projects_retrieve - description: Returns a `Project` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - - contact - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany,Contact: - value: company,contact - summary: Expand Company, Contact - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - projects - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Project' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/purchase-orders: - get: - operationId: purchase_orders_list - description: Returns a list of `PurchaseOrder` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: company_id - schema: - type: string - description: If provided, will only return purchase orders for this company. - examples: - CompanyId: - summary: company_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - accounting_period - - company - - delivery_address - - line_items - - payment_term - - tracking_categories - - vendor - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandLineItems,TrackingCategories,DeliveryAddress,Vendor,Company,AccountingPeriod,PaymentTerm: - value: - line_items,tracking_categories,delivery_address,vendor,company,accounting_period,payment_term - summary: Expand Line_items, Tracking_categories, Delivery_address, Vendor, - Company, Accounting_period, Payment_term - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: issue_date_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects created after this datetime. - - in: query - name: issue_date_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects created before this datetime. - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - tags: - - purchase-orders - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedPurchaseOrderList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: purchase_orders_create - description: Creates a `PurchaseOrder` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - purchase-orders - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PurchaseOrderEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PurchaseOrderEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PurchaseOrderEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/PurchaseOrderResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/purchase-orders/{id}: - get: - operationId: purchase_orders_retrieve - description: Returns a `PurchaseOrder` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - accounting_period - - company - - delivery_address - - line_items - - payment_term - - tracking_categories - - vendor - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandLineItems,TrackingCategories,DeliveryAddress,Vendor,Company,AccountingPeriod,PaymentTerm: - value: - line_items,tracking_categories,delivery_address,vendor,company,accounting_period,payment_term - summary: Expand Line_items, Tracking_categories, Delivery_address, Vendor, - Company, Accounting_period, Payment_term - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - tags: - - purchase-orders - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PurchaseOrder' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/purchase-orders/line-items/remote-field-classes: - get: - operationId: purchase_orders_line_items_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - purchase-orders - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/purchase-orders/meta/post: - get: - operationId: purchase_orders_meta_post_retrieve - description: Returns metadata for `PurchaseOrder` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - purchase-orders - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/purchase-orders/remote-field-classes: - get: - operationId: purchase_orders_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - purchase-orders - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/regenerate-key: - post: - operationId: regenerate_key_create - description: Exchange remote keys. - tags: - - regenerate-key - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKey' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/remote-fields: - get: - operationId: remote_fields_retrieve - description: Get all remote fields for a Linked Account. Remote fields are third-party - fields that are accessible after initial sync if remote_data is enabled. You - can use remote fields to override existing Merge fields or map a new Merge - field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: common_models - schema: - type: string - description: A comma seperated list of Common Model names. If included, will - only return Remote Fields for those Common Models. - - in: query - name: include_example_values - schema: - type: string - description: If true, will include example values, where available, for remote - fields in the 3rd party platform. These examples come from active data from - your customers. - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteFieldAPIResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/sync-status: - get: - operationId: sync_status_list - description: Get sync status for the current sync and the most recently finished - sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` - represents the most recent time any sync completed. These timestamps may correspond - to different sync instances which may result in a sync start time being later - than a separate sync completed time. To ensure you are retrieving the latest - available data reference the `last_sync_finished` timestamp where `last_sync_result` - is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, - `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about - sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - sync-status - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedSyncStatusList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/sync-status/resync: - post: - operationId: sync_status_resync_create - description: Force re-sync of all models. This endpoint is available for monthly, - quarterly, and highest sync frequency customers on the Professional or Enterprise - plans. Doing so will consume a sync credit for the relevant linked account. - Force re-syncs can also be triggered manually in the Merge Dashboard and is - available for all customers. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - force-resync - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SyncStatus' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/target-fields: - get: - operationId: target_fields_retrieve - description: Get all organization-wide Target Fields, this will not include - any Linked Account specific Target Fields. Organization-wide Target Fields - are additional fields appended to the Merge Common Model for all Linked Accounts - in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ExternalTargetFieldAPIResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/tax-rates: - get: - operationId: tax_rates_list - description: Returns a list of `TaxRate` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: company_id - schema: - type: string - description: If provided, will only return tax rates for this company. - examples: - CompanyId: - summary: company_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany: - value: company - summary: Expand Company - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: name - schema: - type: string - nullable: true - description: If provided, will only return TaxRates with this name. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - tax-rates - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedTaxRateList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/tax-rates/{id}: - get: - operationId: tax_rates_retrieve - description: Returns a `TaxRate` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany: - value: company - summary: Expand Company - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - tax-rates - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/TaxRate' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /accounting/v1/tracking-categories: - get: - operationId: tracking_categories_list - description: Returns a list of `TrackingCategory` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: category_type - schema: - type: string - nullable: true - enum: - - '' - - CLASS - - DEPARTMENT - - - description: If provided, will only return tracking categories with this type. - - in: query - name: company_id - schema: - type: string - description: If provided, will only return tracking categories for this company. - examples: - CompanyId: - summary: company_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany: - value: company - summary: Expand Company - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: name - schema: - type: string - nullable: true - description: If provided, will only return tracking categories with this name. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: status - schema: - type: string - nullable: true - enum: - - '' - - ACTIVE - - ARCHIVED - - - description: If provided, will only return tracking categories with this status. - tags: - - tracking-categories - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedTrackingCategoryList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/tracking-categories/{id}: - get: - operationId: tracking_categories_retrieve - description: Returns a `TrackingCategory` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCompany: - value: company - summary: Expand Company - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - tags: - - tracking-categories - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/TrackingCategory' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/transactions: - get: - operationId: transactions_list - description: Returns a list of `Transaction` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: company_id - schema: - type: string - description: If provided, will only return accounting transactions for this - company. - examples: - CompanyId: - summary: company_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - accounting_period - - contact - - line_items - - tracking_categories - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandLineItems,TrackingCategories,Contact,Account,AccountingPeriod: - value: line_items,tracking_categories,contact,account,accounting_period - summary: Expand Line_items, Tracking_categories, Contact, Account, Accounting_period - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: transaction_date_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects created after this datetime. - - in: query - name: transaction_date_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects created before this datetime. - tags: - - transactions - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedTransactionList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/transactions/{id}: - get: - operationId: transactions_retrieve - description: Returns a `Transaction` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - accounting_period - - contact - - line_items - - tracking_categories - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandLineItems,TrackingCategories,Contact,Account,AccountingPeriod: - value: line_items,tracking_categories,contact,account,accounting_period - summary: Expand Line_items, Tracking_categories, Contact, Account, Accounting_period - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - transactions - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Transaction' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/vendor-credits: - get: - operationId: vendor_credits_list - description: Returns a list of `VendorCredit` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: company_id - schema: - type: string - description: If provided, will only return vendor credits for this company. - examples: - CompanyId: - summary: company_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - accounting_period - - company - - lines - - tracking_categories - - vendor - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandLines,TrackingCategories,Vendor,Company,AccountingPeriod: - value: lines,tracking_categories,vendor,company,accounting_period - summary: Expand Lines, Tracking_categories, Vendor, Company, Accounting_period - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: transaction_date_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects created after this datetime. - - in: query - name: transaction_date_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return objects created before this datetime. - tags: - - vendor-credits - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedVendorCreditList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: vendor_credits_create - description: Creates a `VendorCredit` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - vendor-credits - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/VendorCreditEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/VendorCreditEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/VendorCreditEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/VendorCreditResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/vendor-credits/{id}: - get: - operationId: vendor_credits_retrieve - description: Returns a `VendorCredit` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - accounting_period - - company - - lines - - tracking_categories - - vendor - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandLines,TrackingCategories,Vendor,Company,AccountingPeriod: - value: lines,tracking_categories,vendor,company,accounting_period - summary: Expand Lines, Tracking_categories, Vendor, Company, Accounting_period - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - vendor-credits - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/VendorCredit' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/vendor-credits/meta/post: - get: - operationId: vendor_credits_meta_post_retrieve - description: Returns metadata for `VendorCredit` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - vendor-credits - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /accounting/v1/webhook-receivers: - get: - operationId: webhook_receivers_list - description: Returns a list of `WebhookReceiver` objects. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - webhook-receivers - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/WebhookReceiver' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: webhook_receivers_create - description: Creates a `WebhookReceiver` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - webhook-receivers - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookReceiver' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC -components: - schemas: - Account: - type: object - description: |- - # The Account Object - ### Description - An `Account` represents a category in a company’s ledger in which a financial transaction is recorded against. The aggregation of each `Account` object is often referred to as the **Chart of Accounts**. - - An `Account` can be classified into one of the following categories, determined through the `classification` field: - * __Asset:__ Accounts Receivable and Bank Accounts - * __Liability:__ Accounts Payable and Credit Card Accounts - * __Equity:__ Treasury Accounts and Retained Earnings - * __Revenue:__ Income and Other Income - * __Expense:__ Cost of Goods Sold and Office Expenses - - ### Usage Example - Fetch from the `LIST Accounts` endpoint and view a company's accounts. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '21' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The account's name. - example: Cash - description: - type: string - nullable: true - description: The account's description. - example: Cash - classification: - oneOf: - - $ref: '#/components/schemas/ClassificationEnum' - - type: string - nullable: true - description: |- - The account's broadest grouping. - - * `ASSET` - ASSET - * `EQUITY` - EQUITY - * `EXPENSE` - EXPENSE - * `LIABILITY` - LIABILITY - * `REVENUE` - REVENUE - example: ASSET - type: - type: string - nullable: true - description: The account's type is a narrower and more specific grouping - within the account's classification. - example: Asset - account_type: - oneOf: - - $ref: '#/components/schemas/AccountAccountTypeEnum' - - type: string - nullable: true - description: |- - Normalized account type- which is a narrower and more specific grouping within the account's classification. - - * `BANK` - BANK - * `CREDIT_CARD` - CREDIT_CARD - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - * `FIXED_ASSET` - FIXED_ASSET - * `OTHER_ASSET` - OTHER_ASSET - * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET - * `OTHER_EXPENSE` - OTHER_EXPENSE - * `OTHER_INCOME` - OTHER_INCOME - * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD - * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY - * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY - * `NON_POSTING` - NON_POSTING - example: FIXED_ASSET - status: - oneOf: - - $ref: '#/components/schemas/AccountStatusEnum' - - type: string - nullable: true - description: |- - The account's status. - - * `ACTIVE` - ACTIVE - * `PENDING` - PENDING - * `INACTIVE` - INACTIVE - example: ACTIVE - current_balance: - type: number - format: double - nullable: true - description: The account's current balance. - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The account's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - account_number: - type: string - nullable: true - description: The account's number. - example: X12Y9AB - parent_account: - type: string - format: uuid - nullable: true - description: ID of the parent account. - example: 22d92d6c-22f9-11ed-861d-0242ac120002 - company: - type: string - format: uuid - nullable: true - description: The company the account belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - x-merge-model-tooltip: - title: Looking for __Bank Accounts__? - content: Bank Accounts are represented as an __Account__ with a `classification` - of __ASSET__. - x-merge-expands: '{"owner": "User"}' - x-merge-category: accounting - AccountAccountTypeEnum: - enum: - - BANK - - CREDIT_CARD - - ACCOUNTS_PAYABLE - - ACCOUNTS_RECEIVABLE - - FIXED_ASSET - - OTHER_ASSET - - OTHER_CURRENT_ASSET - - OTHER_EXPENSE - - OTHER_INCOME - - COST_OF_GOODS_SOLD - - OTHER_CURRENT_LIABILITY - - LONG_TERM_LIABILITY - - NON_POSTING - type: string - description: |- - * `BANK` - BANK - * `CREDIT_CARD` - CREDIT_CARD - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - * `FIXED_ASSET` - FIXED_ASSET - * `OTHER_ASSET` - OTHER_ASSET - * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET - * `OTHER_EXPENSE` - OTHER_EXPENSE - * `OTHER_INCOME` - OTHER_INCOME - * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD - * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY - * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY - * `NON_POSTING` - NON_POSTING - x-merge-category: accounting - AccountDetails: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - integration: - type: string - readOnly: true - example: BambooHR - integration_slug: - type: string - readOnly: true - example: bamboohr - category: - allOf: - - $ref: '#/components/schemas/CategoryEnum' - nullable: true - example: hris - end_user_origin_id: - type: string - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - end_user_organization_name: - type: string - readOnly: true - example: Waystar Royco - end_user_email_address: - type: string - format: email - readOnly: true - example: kendall.roy@waystar-royco.com - status: - type: string - readOnly: true - example: COMPLETE - webhook_listener_url: - type: string - format: uri - readOnly: true - example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: - type: boolean - nullable: true - readOnly: true - description: Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test Linked - Accounts, incomplete Production Linked Accounts, and ignored duplicate - Production Linked Account sets. - example: true - account_type: - type: string - readOnly: true - example: PRODUCTION - completed_at: - type: string - format: date-time - nullable: true - description: The time at which account completes the linking flow. - example: '2024-08-26T20:11:19.277118Z' - x-merge-category: accounting - AccountDetailsAndActions: - type: object - description: |- - # The LinkedAccount Object - ### Description - The `LinkedAccount` object is used to represent an end user's link with a specific integration. - - ### Usage Example - View a list of your organization's `LinkedAccount` objects. - properties: - id: - type: string - example: e59b1821-f85c-4e28-a6b3-1804156f3563 - category: - oneOf: - - $ref: '#/components/schemas/CategoryEnum' - - type: string - example: hris - status: - oneOf: - - $ref: '#/components/schemas/AccountDetailsAndActionsStatusEnum' - - type: string - example: INCOMPLETE - status_detail: - type: string - example: Invalid login credentials - end_user_origin_id: - type: string - example: 3ac95cde-6c7f-4eef-afec-be710b42308d - end_user_organization_name: - type: string - example: Foo Bar, LLC - end_user_email_address: - type: string - example: hradmin@foobar.dev - subdomain: - type: string - description: The tenant or domain the customer has provided access to. - example: foobar - webhook_listener_url: - type: string - example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: - type: boolean - nullable: true - description: Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test Linked - Accounts, incomplete Production Linked Accounts, and ignored duplicate - Production Linked Account sets. - example: true - integration: - $ref: '#/components/schemas/AccountDetailsAndActionsIntegration' - example: - name: SAP SuccessFactors - categories: - - hris - - ats - image: https://cdn.merge.dev/SuccessFactors_Logo.png - square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg - color: '#F6A704' - slug: sap-successfactors - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - account_type: - type: string - example: PRODUCTION - completed_at: - type: string - format: date-time - example: '2024-08-26T20:11:19.277118Z' - required: - - account_type - - completed_at - - end_user_email_address - - end_user_organization_name - - id - - status - - webhook_listener_url - x-merge-sample-json: '{"id": "e59b1821-f85c-4e28-a6b3-1804156f3563", "category": - "hris", "status": "INCOMPLETE", "status_detail": "Invalid login credentials", - "end_user_origin_id": "3ac95cde-6c7f-4eef-afec-be710b42308d", "end_user_organization_name": - "Foo Bar, LLC", "end_user_email_address": "hradmin@foobar.dev", "webhook_listener_url": - "https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4", - "is_duplicate": true, "integration": {"name": "SAP SuccessFactors", "categories": - ["hris", "ats"], "image": "https://cdn.merge.dev/SuccessFactors_Logo.png", - "square_image": "https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg", "color": - "#F6A704", "slug": "sap-successfactors", "passthrough_available": true, "available_model_operations": - [{"model_name": "Candidate", "available_operations": ["FETCH", "CREATE"], - "required_post_parameters": ["remote_user_id"], "supported_fields": ["first_name", - "last_name", "company", "title"]}]}}' - x-merge-category: accounting - AccountDetailsAndActionsIntegration: - type: object - properties: - name: - type: string - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - image: - type: string - square_image: - type: string - color: - type: string - slug: - type: string - passthrough_available: - type: boolean - available_model_operations: - type: array - items: - $ref: '#/components/schemas/ModelOperation' - required: - - categories - - color - - name - - passthrough_available - - slug - x-merge-category: accounting - AccountDetailsAndActionsStatusEnum: - enum: - - COMPLETE - - INCOMPLETE - - RELINK_NEEDED - - IDLE - type: string - description: |- - * `COMPLETE` - COMPLETE - * `INCOMPLETE` - INCOMPLETE - * `RELINK_NEEDED` - RELINK_NEEDED - * `IDLE` - IDLE - x-merge-category: accounting - AccountEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/AccountRequest' - required: - - model - x-merge-category: accounting - AccountIntegration: - type: object - properties: - name: - type: string - description: Company name. - abbreviated_name: - type: string - nullable: true - description: "Optional. This shortened name appears in places with limited - space, usually in conjunction with the platform's logo (e.g., Merge Link - menu).

Example: Workforce Now (in lieu of ADP Workforce Now), - SuccessFactors (in lieu of SAP SuccessFactors)" - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - description: Category or categories this integration belongs to. Multiple - categories should be comma separated, i.e. [ats, hris]. - readOnly: true - image: - type: string - format: uri - nullable: true - description: Company logo in rectangular shape. - square_image: - type: string - format: uri - nullable: true - description: Company logo in square shape. - color: - type: string - description: The color of this integration used for buttons and text throughout - the app and landing pages. Choose a darker, saturated color. - pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ - maxLength: 18 - slug: - type: string - readOnly: true - api_endpoints_to_documentation_urls: - type: object - additionalProperties: {} - description: "Mapping of API endpoints to documentation urls for support. - Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', - 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], - 'POST': []}" - webhook_setup_guide_url: - type: string - nullable: true - description: Setup guide URL for third party webhook creation. Exposed in - Merge Docs. - category_beta_status: - type: object - description: Category or categories this integration is in beta status for. - readOnly: true - required: - - name - x-merge-category: accounting - AccountRequest: - type: object - description: |- - # The Account Object - ### Description - An `Account` represents a category in a company’s ledger in which a financial transaction is recorded against. The aggregation of each `Account` object is often referred to as the **Chart of Accounts**. - - An `Account` can be classified into one of the following categories, determined through the `classification` field: - * __Asset:__ Accounts Receivable and Bank Accounts - * __Liability:__ Accounts Payable and Credit Card Accounts - * __Equity:__ Treasury Accounts and Retained Earnings - * __Revenue:__ Income and Other Income - * __Expense:__ Cost of Goods Sold and Office Expenses - - ### Usage Example - Fetch from the `LIST Accounts` endpoint and view a company's accounts. - properties: - name: - type: string - nullable: true - description: The account's name. - example: Cash - description: - type: string - nullable: true - description: The account's description. - example: Cash - classification: - oneOf: - - $ref: '#/components/schemas/ClassificationEnum' - - type: string - nullable: true - description: |- - The account's broadest grouping. - - * `ASSET` - ASSET - * `EQUITY` - EQUITY - * `EXPENSE` - EXPENSE - * `LIABILITY` - LIABILITY - * `REVENUE` - REVENUE - example: ASSET - type: - type: string - nullable: true - description: The account's type is a narrower and more specific grouping - within the account's classification. - example: Asset - account_type: - oneOf: - - $ref: '#/components/schemas/AccountAccountTypeEnum' - - type: string - nullable: true - description: |- - Normalized account type- which is a narrower and more specific grouping within the account's classification. - - * `BANK` - BANK - * `CREDIT_CARD` - CREDIT_CARD - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - * `FIXED_ASSET` - FIXED_ASSET - * `OTHER_ASSET` - OTHER_ASSET - * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET - * `OTHER_EXPENSE` - OTHER_EXPENSE - * `OTHER_INCOME` - OTHER_INCOME - * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD - * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY - * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY - * `NON_POSTING` - NON_POSTING - example: FIXED_ASSET - status: - oneOf: - - $ref: '#/components/schemas/AccountStatusEnum' - - type: string - nullable: true - description: |- - The account's status. - - * `ACTIVE` - ACTIVE - * `PENDING` - PENDING - * `INACTIVE` - INACTIVE - example: ACTIVE - current_balance: - type: number - format: double - nullable: true - description: The account's current balance. - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The account's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - account_number: - type: string - nullable: true - description: The account's number. - example: X12Y9AB - parent_account: - type: string - format: uuid - nullable: true - description: ID of the parent account. - example: 22d92d6c-22f9-11ed-861d-0242ac120002 - company: - type: string - format: uuid - nullable: true - description: The company the account belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-model-tooltip: - title: Looking for __Bank Accounts__? - content: Bank Accounts are represented as an __Account__ with a `classification` - of __ASSET__. - x-merge-expands: '{"owner": "User"}' - x-merge-category: accounting - AccountResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Account' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: accounting - AccountStatusEnum: - enum: - - ACTIVE - - PENDING - - INACTIVE - type: string - description: |- - * `ACTIVE` - ACTIVE - * `PENDING` - PENDING - * `INACTIVE` - INACTIVE - x-merge-category: accounting - AccountToken: - type: object - properties: - account_token: - type: string - example: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB - integration: - $ref: '#/components/schemas/AccountIntegration' - example: - name: SAP SuccessFactors - categories: - - hris - - ats - image: https://cdn.merge.dev/SuccessFactors_Logo.png - square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg - color: '#F6A704' - slug: sap-successfactors - id: - type: string - example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - required: - - account_token - - id - - integration - x-merge-category: accounting - AccountingAttachment: - type: object - description: |- - # The Accounting Attachment Object - ### Description - The `AccountingAttachment` object is used to represent a company's attachments. - - ### Usage Example - Fetch from the `LIST AccountingAttachments` endpoint and view a company's attachments. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '1018270' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - file_name: - type: string - nullable: true - description: The attachment's name. - example: invoice.png - file_url: - type: string - format: uri - nullable: true - maxLength: 2000 - example: https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png - description: The attachment's url. - company: - type: string - format: uuid - nullable: true - description: The company the accounting attachment belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - x-merge-category: accounting - AccountingAttachmentEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/AccountingAttachmentRequest' - required: - - model - x-merge-category: accounting - AccountingAttachmentRequest: - type: object - description: |- - # The Accounting Attachment Object - ### Description - The `AccountingAttachment` object is used to represent a company's attachments. - - ### Usage Example - Fetch from the `LIST AccountingAttachments` endpoint and view a company's attachments. - properties: - file_name: - type: string - nullable: true - description: The attachment's name. - example: invoice.png - file_url: - type: string - format: uri - nullable: true - maxLength: 2000 - example: https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png - description: The attachment's url. - company: - type: string - format: uuid - nullable: true - description: The company the accounting attachment belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-category: accounting - AccountingAttachmentResponse: - type: object - properties: - model: - $ref: '#/components/schemas/AccountingAttachment' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: accounting - AccountingPeriod: - type: object - description: |- - # The AccountingPeriod Object - ### Description - The `AccountingPeriod` object is used to define a period of time in which events occurred. - - ### Usage Example - Common models like `Invoice` and `Transaction` will have `AccountingPeriod` objects which will denote when they occurred. - properties: - id: - type: string - format: uuid - readOnly: true - example: 3015f7b1-4d01-460d-bfab-02a52d16cbd0 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '2804580' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: Name of the accounting period. - maxLength: 100 - example: April 2020 Financials - status: - oneOf: - - $ref: '#/components/schemas/Status895Enum' - - type: string - nullable: true - example: ACTIVE - start_date: - type: string - format: date-time - nullable: true - description: Beginning date of the period - example: '2020-03-31T00:00:00Z' - end_date: - type: string - format: date-time - nullable: true - description: End date of the period - example: '2020-04-31T00:00:00Z' - field_mappings: - type: object - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - x-merge-category: accounting - AccountingPhoneNumber: - type: object - description: |- - # The AccountingPhoneNumber Object - ### Description - The `AccountingPhoneNumber` object is used to represent a contact's or company's phone number. - - ### Usage Example - Fetch from the `GET CompanyInfo` endpoint and view the company's phone numbers. - properties: - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - number: - type: string - nullable: true - description: The phone number. - example: '+3198675309' - type: - type: string - nullable: true - description: The phone number's type. - example: Mobile - x-merge-category: accounting - AccountingPhoneNumberRequest: - type: object - description: |- - # The AccountingPhoneNumber Object - ### Description - The `AccountingPhoneNumber` object is used to represent a contact's or company's phone number. - - ### Usage Example - Fetch from the `GET CompanyInfo` endpoint and view the company's phone numbers. - properties: - number: - type: string - nullable: true - description: The phone number. - example: '+3198675309' - type: - type: string - nullable: true - description: The phone number's type. - example: Mobile - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-category: accounting - Address: - type: object - description: |- - # The Address Object - ### Description - The `Address` object is used to represent a contact's or company's address. - - ### Usage Example - Fetch from the `GET CompanyInfo` endpoint and view the company's addresses. - properties: - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - type: - oneOf: - - $ref: '#/components/schemas/AddressTypeEnum' - - type: string - nullable: true - description: |- - The address type. - - * `BILLING` - BILLING - * `SHIPPING` - SHIPPING - example: SHIPPING - street_1: - type: string - nullable: true - description: Line 1 of the address's street. - example: 2920 Broadway - street_2: - type: string - nullable: true - description: Line 2 of the address's street. - example: 2nd Floor - city: - type: string - nullable: true - description: The address's city. - example: New York - state: - nullable: true - description: The address's state or region. - readOnly: true - example: NY - country_subdivision: - type: string - nullable: true - description: The address's state or region. - example: NY - country: - oneOf: - - $ref: '#/components/schemas/CountryEnum' - - type: string - nullable: true - description: |- - The address's country. - - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - example: US - zip_code: - type: string - nullable: true - description: The address's zip code. - example: '10027' - x-merge-nested-write-allowed: true - x-merge-category: accounting - AddressRequest: - type: object - description: |- - # The Address Object - ### Description - The `Address` object is used to represent a contact's or company's address. - - ### Usage Example - Fetch from the `GET CompanyInfo` endpoint and view the company's addresses. - properties: - type: - oneOf: - - $ref: '#/components/schemas/AddressTypeEnum' - - type: string - nullable: true - description: |- - The address type. - - * `BILLING` - BILLING - * `SHIPPING` - SHIPPING - example: SHIPPING - street_1: - type: string - nullable: true - description: Line 1 of the address's street. - example: 2920 Broadway - street_2: - type: string - nullable: true - description: Line 2 of the address's street. - example: 2nd Floor - city: - type: string - nullable: true - description: The address's city. - example: New York - country_subdivision: - type: string - nullable: true - description: The address's state or region. - example: NY - country: - oneOf: - - $ref: '#/components/schemas/CountryEnum' - - type: string - nullable: true - description: |- - The address's country. - - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - example: US - zip_code: - type: string - nullable: true - description: The address's zip code. - example: '10027' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-category: accounting - AddressTypeEnum: - enum: - - BILLING - - SHIPPING - type: string - description: |- - * `BILLING` - BILLING - * `SHIPPING` - SHIPPING - x-merge-category: accounting - AdvancedMetadata: - type: object - properties: - id: - type: string - format: uuid - display_name: - type: string - description: - type: string - is_required: - type: boolean - is_custom: - type: boolean - field_choices: - type: array - items: {} - required: - - id - x-merge-category: accounting - AsyncPassthroughReciept: - type: object - properties: - async_passthrough_receipt_id: - type: string - format: uuid - example: fd29020f-2695-445e-922e-dcd5e81903fd - required: - - async_passthrough_receipt_id - x-merge-category: accounting - AsyncPostTask: - type: object - properties: - status: - oneOf: - - $ref: '#/components/schemas/AsyncPostTaskStatusEnum' - - type: string - example: COMPLETED - result: - $ref: '#/components/schemas/AsyncPostTaskResult' - required: - - result - - status - x-merge-category: accounting - AsyncPostTaskResult: - type: object - properties: - status_code: - type: integer - example: 201 - response: - type: object - additionalProperties: {} - example: - model: - id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - remote_id: '990110' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - integration_params: - unique_integration_field: unique_integration_field_value - linked_account_params: - unique_linked_account_field: unique_linked_account_field_value - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - type: ACCOUNTS_RECEIVABLE - contact: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 - number: AIQ12546 - issue_date: '2020-03-31T00:00:00Z' - due_date: '2020-04-15T00:00:00Z' - memo: Weekly Payment - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - employee: 7442f0d5-722d-45bd-b807-6e38489d37fe - paid_on_date: '2020-04-01T00:00:00Z' - currency: USD - exchange_rate: '2.9' - status: DRAFT - total_discount: 0 - sub_total: 100 - total_tax_amount: 5 - total_amount: 105 - balance: 105 - inclusive_of_tax: false - remote_updated_at: '2020-04-01T00:00:00Z' - tracking_categories: - - 7dc5ca17-d311-44cd-9ce0-333080367a18 - - 6aa0700c-48e1-4c4a-8162-02e6a582df05 - - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 - purchase_orders: - - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 - - dd70ca2f-b120-46fa-889a-9604037f45fd - - 889b281d-739c-4759-95b8-0aedb3947131 - accounting_period: 7dc5ca17-d311-44cd-9ce0-333080367a18 - payments: - - b26fd49a-cbae-470a-a8f8-bcbc119e0390 - applied_payments: - - 9017594e-dc33-4113-a5d2-b0f928e34fdd - line_items: [] - applied_credit_notes: [] - applied_vendor_credits: [] - remote_data: - - path: /actions - data: - - Varies by platform - x-merge-category: accounting - AsyncPostTaskStatusEnum: - enum: - - QUEUED - - IN_PROGRESS - - COMPLETED - - FAILURE - type: string - description: |- - * `QUEUED` - QUEUED - * `IN_PROGRESS` - IN_PROGRESS - * `COMPLETED` - COMPLETED - * `FAILURE` - FAILURE - x-merge-category: accounting - AuditLogEvent: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: b5ceea2a-7171-47ce-8090-165cfce5572c - user_name: - type: string - nullable: true - description: The User's full name at the time of this Event occurring. - maxLength: 200 - example: Gil Feig - user_email: - type: string - format: email - nullable: true - description: The User's email at the time of this Event occurring. - maxLength: 254 - example: hello@merge.dev - role: - oneOf: - - $ref: '#/components/schemas/RoleEnum' - - type: string - description: |- - Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. - - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - example: ADMIN - ip_address: - type: string - maxLength: 45 - example: 192.0.2.123 - event_type: - oneOf: - - $ref: '#/components/schemas/EventTypeEnum' - - type: string - description: |- - Designates the type of event that occurred. - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - * `INVITED_USER` - INVITED_USER - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - * `CREATED_DESTINATION` - CREATED_DESTINATION - * `DELETED_DESTINATION` - DELETED_DESTINATION - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - * `CHANGED_SCOPES` - CHANGED_SCOPES - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - * `RESET_PASSWORD` - RESET_PASSWORD - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - * `MUTED_ISSUE` - MUTED_ISSUE - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - example: CHANGED_SCOPES - event_description: - type: string - example: Organization-wide Scopes for model hris.Employee updated from Read - to Read+Write - created_at: - type: string - format: date-time - readOnly: true - required: - - event_description - - event_type - - ip_address - - role - x-merge-category: accounting - AvailableActions: - type: object - description: |- - # The AvailableActions Object - ### Description - The `Activity` object is used to see all available model/operation combinations for an integration. - - ### Usage Example - Fetch all the actions available for the `Zenefits` integration. - properties: - integration: - $ref: '#/components/schemas/AccountIntegration' - example: - name: Lever - categories: - - ats - image: https://merge-api-production.s3.amazonaws.com/media/Lever_Logo.png - square_image: https://merge-api-production.s3.amazonaws.com/media/Lever_Square_Logo.png - color: '#262A34' - is_in_beta: 'true' - api_endpoints_to_documentation_urls: "{'GET': [('/common-model-scopes', - 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve')], - 'POST': []}" - passthrough_available: - type: boolean - example: true - available_model_operations: - type: array - items: - $ref: '#/components/schemas/ModelOperation' - example: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - required: - - integration - - passthrough_available - x-merge-category: accounting - BalanceSheet: - type: object - description: |- - # The BalanceSheet Object - ### Description - The `BalanceSheet` object shows a company’s assets, liabilities, and equity. Assets should be equal to liability and equity combined. This shows the company’s financial health at a specific point in time. - - ### Usage Example - Fetch from the `LIST BalanceSheets` endpoint and view a company's balance sheets. - properties: - id: - type: string - format: uuid - readOnly: true - example: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '8937018' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The balance sheet's name. - example: BalanceSheet - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The balance sheet's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: '`Company` object for the given `BalanceSheet` object.' - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - date: - type: string - format: date-time - nullable: true - description: The balance sheet's date. The balance sheet data will reflect - the company's financial position this point in time. - example: '2021-09-31T00:00:00Z' - net_assets: - type: number - format: double - nullable: true - description: The balance sheet's net assets. - example: 1000 - assets: - type: array - items: - $ref: '#/components/schemas/ReportItem' - readOnly: true - example: - - remote_id: '10010' - name: Assets - value: 1000 - sub_items: [] - liabilities: - type: array - items: - $ref: '#/components/schemas/ReportItem' - readOnly: true - example: - - remote_id: '10011' - name: Liabilities - value: 500 - sub_items: [] - equity: - type: array - items: - $ref: '#/components/schemas/ReportItem' - readOnly: true - example: - - remote_id: '10012' - name: Equity - value: 500 - sub_items: [] - remote_generated_at: - type: string - format: date-time - nullable: true - description: The time that balance sheet was generated by the accounting - system. - example: '2021-10-01T00:00:00Z' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - x-merge-expands: '{"company": "CompanyInfo"}' - x-merge-category: accounting - BankFeedAccount: - type: object - description: |- - # The BankFeedAccount Object - ### Description - The `BankFeedAccount` object represents a bank feed account, detailing various attributes including account identifiers, names, currency, and balance information. This object is central to managing and tracking bank feed accounts within the system. - - ### Usage Example - Fetch from the `GET BankFeedAccount` endpoint to view details of a bank feed account. - properties: - id: - type: string - format: uuid - readOnly: true - example: b26fd49a-cbae-470a-a8f8-bcbc119e0390 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '987300' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - source_account_id: - type: string - nullable: true - description: The unique identifier of the source account from our customer’s - platform. - maxLength: 1024 - example: '123566909' - target_account_id: - type: string - nullable: true - description: The unique identifier of the target account from the third - party software. - maxLength: 1024 - example: 49cd5a42-b311-4750-9361-52e2ed1d4653 - source_account_name: - type: string - nullable: true - description: The name of the source account as stored in our customer’s - platform. - maxLength: 1024 - example: Travel Bank Account - source_account_number: - type: string - nullable: true - description: The human-readable account number of the source account as - stored in our customer’s platform. - maxLength: 1024 - example: '12567' - target_account_name: - type: string - nullable: true - description: The name of the target account from the third party software. - maxLength: 1024 - example: Netsuite Travel Bank Account - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The currency code of the bank feed. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - feed_status: - oneOf: - - $ref: '#/components/schemas/FeedStatusEnum' - - type: string - nullable: true - description: |- - The status of the bank feed. - - * `ACTIVE` - ACTIVE - * `INACTIVE` - INACTIVE - example: ACTIVE - feed_start_date: - type: string - format: date-time - nullable: true - description: The start date of the bank feed’s transactions. - example: '2024-02-02T00:00:00.000Z' - source_account_balance: - type: number - format: double - nullable: true - description: The current balance of funds in the source account. - example: 123.94 - account_type: - oneOf: - - $ref: '#/components/schemas/BankFeedAccountAccountTypeEnum' - - type: string - nullable: true - description: |- - The type of the account. - - * `BANK` - BANK - * `CREDIT_CARD` - CREDIT_CARD - example: BANK - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - type: object - additionalProperties: {} - nullable: true - description: The full data pulled from the third-party API for an object. - nullable: true - x-merge-category: accounting - BankFeedAccountAccountTypeEnum: - enum: - - BANK - - CREDIT_CARD - type: string - description: |- - * `BANK` - BANK - * `CREDIT_CARD` - CREDIT_CARD - x-merge-category: accounting - BankFeedAccountEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/BankFeedAccountRequest' - required: - - model - x-merge-category: accounting - BankFeedAccountRequest: - type: object - description: |- - # The BankFeedAccount Object - ### Description - The `BankFeedAccount` object represents a bank feed account, detailing various attributes including account identifiers, names, currency, and balance information. This object is central to managing and tracking bank feed accounts within the system. - - ### Usage Example - Fetch from the `GET BankFeedAccount` endpoint to view details of a bank feed account. - properties: - source_account_id: - type: string - nullable: true - description: The unique identifier of the source account from our customer’s - platform. - maxLength: 1024 - example: '123566909' - target_account_id: - type: string - nullable: true - description: The unique identifier of the target account from the third - party software. - maxLength: 1024 - example: 49cd5a42-b311-4750-9361-52e2ed1d4653 - source_account_name: - type: string - nullable: true - description: The name of the source account as stored in our customer’s - platform. - maxLength: 1024 - example: Travel Bank Account - source_account_number: - type: string - nullable: true - description: The human-readable account number of the source account as - stored in our customer’s platform. - maxLength: 1024 - example: '12567' - target_account_name: - type: string - nullable: true - description: The name of the target account from the third party software. - maxLength: 1024 - example: Netsuite Travel Bank Account - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The currency code of the bank feed. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - feed_status: - oneOf: - - $ref: '#/components/schemas/FeedStatusEnum' - - type: string - nullable: true - description: |- - The status of the bank feed. - - * `ACTIVE` - ACTIVE - * `INACTIVE` - INACTIVE - example: ACTIVE - feed_start_date: - type: string - format: date-time - nullable: true - description: The start date of the bank feed’s transactions. - example: '2024-02-02T00:00:00.000Z' - source_account_balance: - type: number - format: double - nullable: true - description: The current balance of funds in the source account. - example: 123.94 - account_type: - oneOf: - - $ref: '#/components/schemas/BankFeedAccountAccountTypeEnum' - - type: string - nullable: true - description: |- - The type of the account. - - * `BANK` - BANK - * `CREDIT_CARD` - CREDIT_CARD - example: BANK - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-category: accounting - BankFeedAccountResponse: - type: object - properties: - model: - $ref: '#/components/schemas/BankFeedAccount' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: accounting - BankFeedTransaction: - type: object - description: |- - # The BankFeedTransaction Object - ### Description - The `BankFeedTransaction` object is used to represent transactions linked to a bank feed account. This includes details about the transaction such as the date, amount, description, and type. - - ### Usage Example - Fetch from the `GET BankFeedTransaction` endpoint to view details of a transaction associated with a bank feed account. - properties: - id: - type: string - format: uuid - readOnly: true - example: b26fd49a-cbae-470a-a8f8-bcbc119e0390 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '987300' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - bank_feed_account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/BankFeedAccount' - nullable: true - description: The bank feed account associated with the transaction. - example: 49cd5a42-b311-4750-9361-52e2ed1d4653 - x-merge-expands-to: BankFeedAccount - transaction_date: - type: string - format: date-time - nullable: true - description: The date that the transaction occurred. - example: '2024-02-02T00:00:00.000Z' - posted_date: - type: string - format: date-time - nullable: true - description: The date the transaction was posted to the bank account. - example: '2024-02-03T00:00:00.000Z' - amount: - type: number - format: double - nullable: true - description: The amount of the transaction. - example: 100.1 - description: - type: string - nullable: true - description: The description of the transaction. - maxLength: 1024 - example: Lunch expense - transaction_type: - type: string - nullable: true - description: The underlying type of the transaction. - maxLength: 1024 - example: payment - payee: - type: string - nullable: true - description: The person or merchant who initiated the transaction, or alternatively, - to whom the transaction was paid. - maxLength: 1024 - example: Elmo's diner - credit_or_debit: - oneOf: - - $ref: '#/components/schemas/CreditOrDebitEnum' - - type: string - nullable: true - description: |- - If the transaction is of type debit or credit. - - * `CREDIT` - CREDIT - * `DEBIT` - DEBIT - example: CREDIT - source_transaction_id: - type: string - nullable: true - description: The customer’s identifier for the transaction. - maxLength: 1024 - example: '124569' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - is_processed: - type: boolean - readOnly: true - description: Whether or not this transaction has been processed by the external - system. For example, NetSuite writes this field as True when the SuiteApp - has processed the transaction. - x-merge-expands: '{"bank_feed_account": "BankFeedAccount"}' - x-merge-category: accounting - BankFeedTransactionEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/BankFeedTransactionRequestRequest' - required: - - model - x-merge-category: accounting - BankFeedTransactionRequestRequest: - type: object - description: |- - # The BankFeedTransaction Object - ### Description - The `BankFeedTransaction` object is used to represent transactions linked to a bank feed account. This includes details about the transaction such as the date, amount, description, and type. - - ### Usage Example - Fetch from the `GET BankFeedTransaction` endpoint to view details of a transaction associated with a bank feed account. - properties: - bank_feed_account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/BankFeedAccount' - nullable: true - description: The bank feed account associated with the transaction. - example: 49cd5a42-b311-4750-9361-52e2ed1d4653 - x-merge-expands-to: BankFeedAccount - transaction_date: - type: string - format: date-time - nullable: true - description: The date that the transaction occurred. - example: '2024-02-02T00:00:00.000Z' - posted_date: - type: string - format: date-time - nullable: true - description: The date the transaction was posted to the bank account. - example: '2024-02-03T00:00:00.000Z' - amount: - type: number - format: double - nullable: true - description: The amount of the transaction. - example: 100.1 - description: - type: string - nullable: true - description: The description of the transaction. - maxLength: 1024 - example: Lunch expense - transaction_type: - type: string - nullable: true - description: The underlying type of the transaction. - maxLength: 1024 - example: payment - payee: - type: string - nullable: true - description: The person or merchant who initiated the transaction, or alternatively, - to whom the transaction was paid. - maxLength: 1024 - example: Elmo's diner - credit_or_debit: - oneOf: - - $ref: '#/components/schemas/CreditOrDebitEnum' - - type: string - nullable: true - description: |- - If the transaction is of type debit or credit. - - * `CREDIT` - CREDIT - * `DEBIT` - DEBIT - example: CREDIT - source_transaction_id: - type: string - nullable: true - description: The customer’s identifier for the transaction. - maxLength: 1024 - example: '124569' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - required: - - bank_feed_account - x-merge-expands: '{"bank_feed_account": "BankFeedAccount"}' - x-merge-category: accounting - BankFeedTransactionResponse: - type: object - properties: - model: - $ref: '#/components/schemas/BankFeedTransaction' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: accounting - CashFlowStatement: - type: object - description: |- - # The CashFlowStatement Object - ### Description - The `CashFlowStatement` object shows operating activities, investing activities, and financing activities over a period of time (month, quarter, or year). - - ### Usage Example - Fetch from the `LIST CashFlowStatements` endpoint and view a company's cash flow statements. - properties: - id: - type: string - format: uuid - readOnly: true - example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '8211088' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The cash flow statement's name. - example: CashFlow - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The cash flow statement's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the cash flow statement belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - start_period: - type: string - format: date-time - nullable: true - description: The cash flow statement's start period. - example: '2020-01-01T00:00:00Z' - end_period: - type: string - format: date-time - nullable: true - description: The cash flow statement's end period. - example: '2020-03-31T00:00:00Z' - cash_at_beginning_of_period: - type: number - format: double - nullable: true - description: Cash and cash equivalents at the beginning of the cash flow - statement's period. - example: 5000 - cash_at_end_of_period: - type: number - format: double - nullable: true - description: Cash and cash equivalents at the beginning of the cash flow - statement's period. - example: 4063.52 - operating_activities: - type: array - items: - $ref: '#/components/schemas/ReportItem' - readOnly: true - example: - - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-09-18T00:00:00Z' - name: Operating Activities - value: 1000 - sub_items: - - remote_id: '23042938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-09-18T00:00:00Z' - name: Net Income - value: 1097.13 - sub_items: [] - company: - investing_activities: - type: array - items: - $ref: '#/components/schemas/ReportItem' - readOnly: true - example: - - remote_id: '192406939' - created_at: '2021-11-15T00:00:00Z' - modified_at: '2021-11-18T00:00:00Z' - name: Equipment - value: 1000 - sub_items: - - remote_id: - created_at: '2021-11-15T00:00:00Z' - modified_at: '2021-09-18T00:00:00Z' - name: Equipment - value: 1000 - sub_items: [] - company: - financing_activities: - type: array - items: - $ref: '#/components/schemas/ReportItem' - readOnly: true - example: - - remote_id: '192406939' - created_at: '2021-11-15T00:00:00Z' - modified_at: '2021-11-15T00:00:00Z' - sub_items: [] - remote_generated_at: - type: string - format: date-time - nullable: true - description: The time that cash flow statement was generated by the accounting - system. - example: '2020-04-01T00:00:00Z' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - x-merge-expands: '{"company": "CompanyInfo"}' - x-merge-category: accounting - CategoriesEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - type: string - description: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - x-merge-category: accounting - CategoryEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - type: string - description: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - x-merge-category: accounting - CategoryTypeEnum: - enum: - - CLASS - - DEPARTMENT - type: string - description: |- - * `CLASS` - CLASS - * `DEPARTMENT` - DEPARTMENT - x-merge-category: accounting - ClassificationEnum: - enum: - - ASSET - - EQUITY - - EXPENSE - - LIABILITY - - REVENUE - type: string - description: |- - * `ASSET` - ASSET - * `EQUITY` - EQUITY - * `EXPENSE` - EXPENSE - * `LIABILITY` - LIABILITY - * `REVENUE` - REVENUE - x-merge-category: accounting - CommonModelScopeAPI: - type: object - properties: - common_models: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializer' - description: The common models you want to update the scopes for - example: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - required: - - common_models - x-merge-category: accounting - CommonModelScopesBodyRequest: - type: object - properties: - model_id: - type: string - minLength: 1 - example: hris.Employee - enabled_actions: - type: array - items: - $ref: '#/components/schemas/EnabledActionsEnum' - example: - - READ - - WRITE - disabled_fields: - type: array - items: - type: string - minLength: 1 - example: - - first_name - required: - - disabled_fields - - enabled_actions - - model_id - x-merge-category: accounting - CompanyInfo: - type: object - description: |- - # The CompanyInfo Object - ### Description - The `CompanyInfo` object contains information about the company of the linked account. If the company has multiple entities (also known as subsidiaries), each entity may show up as a single `CompanyInfo` record. - - ### Usage Example - Fetch from the `GET CompanyInfo` endpoint and view a company's information. - properties: - id: - type: string - format: uuid - readOnly: true - example: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The company's name. - example: Merge Pickleball Company - legal_name: - type: string - nullable: true - description: The company's legal name. - example: Merge Pickleball Company Inc. - tax_number: - type: string - nullable: true - description: The company's tax number. - example: 11-0011000 - fiscal_year_end_month: - type: integer - maximum: 12 - minimum: 1 - nullable: true - description: The company's fiscal year end month. - example: 12 - fiscal_year_end_day: - type: integer - maximum: 31 - minimum: 1 - nullable: true - description: The company's fiscal year end day. - example: 31 - currency: - nullable: true - description: |- - The currency set in the company's accounting platform. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's company was created. - example: '2020-03-31T00:00:00Z' - urls: - type: array - items: - type: string - nullable: true - description: The url. - nullable: true - description: The company's urls. - example: https://www.merge.dev - addresses: - type: array - items: - $ref: '#/components/schemas/Address' - example: - - street_1: 2920 Broadway - street_2: 2nd Floor - city: New York - state: NY - country: US - zip_code: '10027' - x-merge-expands-to: Address - phone_numbers: - type: array - items: - $ref: '#/components/schemas/AccountingPhoneNumber' - x-merge-expands-to: AccountingPhoneNumber - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - x-merge-expands: '{"addresses": "Address", "phone_numbers": "AccountingPhoneNumber"}' - x-merge-category: accounting - ComponentTypeEnum: - enum: - - SALES - - PURCHASE - type: string - description: |- - * `SALES` - SALES - * `PURCHASE` - PURCHASE - x-merge-category: accounting - Contact: - type: object - description: |- - # The Contact Object - ### Description - A `Contact` is an individual or business entity to which products and services are sold to or purchased from. The `Contact` model contains both Customers, in which products and services are sold to, and Vendors (or Suppliers), in which products and services are purchased from. - * A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. - * A `Contact` is a customer if the `is_customer` property is true. - - ### Usage Example - Fetch from the `LIST Contacts` endpoint and view a company's contacts. - properties: - id: - type: string - format: uuid - readOnly: true - example: c640b80b-fac9-409f-aa19-1f9221aec445 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '11167' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The contact's name. - example: Gil Feig's pickleball store - is_supplier: - type: boolean - nullable: true - description: Whether the contact is a supplier. - is_customer: - type: boolean - nullable: true - description: Whether the contact is a customer. - example: true - email_address: - type: string - nullable: true - description: The contact's email address. - example: pickleball@merge.dev - tax_number: - type: string - nullable: true - description: The contact's tax number. - example: 12-3456789 - status: - oneOf: - - $ref: '#/components/schemas/Status7d1Enum' - - type: string - nullable: true - description: |- - The contact's status - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - example: ACTIVE - currency: - type: string - nullable: true - description: The currency the contact's transactions are in. - example: USD - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's contact was updated. - example: '2020-03-31T00:00:00Z' - company: - type: string - format: uuid - nullable: true - description: The company the contact belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - addresses: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Address' - nullable: true - example: - - 2f2702aa-8948-492b-a412-2acdf6d2c499 - - d98c7428-8dda-48a8-a1da-c570f65e2375 - description: '`Address` object IDs for the given `Contacts` object.' - phone_numbers: - type: array - items: - $ref: '#/components/schemas/AccountingPhoneNumber' - example: - - number: '+3198675309' - type: Mobile - description: '`AccountingPhoneNumber` object for the given `Contacts` object.' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-expands: '{"account": "Account"}' - x-merge-category: accounting - ContactEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/ContactRequest' - required: - - model - x-merge-category: accounting - ContactRequest: - type: object - description: |- - # The Contact Object - ### Description - A `Contact` is an individual or business entity to which products and services are sold to or purchased from. The `Contact` model contains both Customers, in which products and services are sold to, and Vendors (or Suppliers), in which products and services are purchased from. - * A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. - * A `Contact` is a customer if the `is_customer` property is true. - - ### Usage Example - Fetch from the `LIST Contacts` endpoint and view a company's contacts. - properties: - name: - type: string - nullable: true - description: The contact's name. - example: Gil Feig's pickleball store - is_supplier: - type: boolean - nullable: true - description: Whether the contact is a supplier. - is_customer: - type: boolean - nullable: true - description: Whether the contact is a customer. - example: true - email_address: - type: string - nullable: true - description: The contact's email address. - example: pickleball@merge.dev - tax_number: - type: string - nullable: true - description: The contact's tax number. - example: 12-3456789 - status: - oneOf: - - $ref: '#/components/schemas/Status7d1Enum' - - type: string - nullable: true - description: |- - The contact's status - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - example: ACTIVE - currency: - type: string - nullable: true - description: The currency the contact's transactions are in. - example: USD - company: - type: string - format: uuid - nullable: true - description: The company the contact belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - addresses: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Address' - nullable: true - example: - - 2f2702aa-8948-492b-a412-2acdf6d2c499 - - d98c7428-8dda-48a8-a1da-c570f65e2375 - description: '`Address` object IDs for the given `Contacts` object.' - phone_numbers: - type: array - items: - $ref: '#/components/schemas/AccountingPhoneNumberRequest' - example: - - number: '+3198675309' - type: Mobile - description: '`AccountingPhoneNumber` object for the given `Contacts` object.' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"account": "Account"}' - x-merge-category: accounting - ContactResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Contact' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: accounting - CountryEnum: - enum: - - AF - - AX - - AL - - DZ - - AS - - AD - - AO - - AI - - AQ - - AG - - AR - - AM - - AW - - AU - - AT - - AZ - - BS - - BH - - BD - - BB - - BY - - BE - - BZ - - BJ - - BM - - BT - - BO - - BQ - - BA - - BW - - BV - - BR - - IO - - BN - - BG - - BF - - BI - - CV - - KH - - CM - - CA - - KY - - CF - - TD - - CL - - CN - - CX - - CC - - CO - - KM - - CG - - CD - - CK - - CR - - CI - - HR - - CU - - CW - - CY - - CZ - - DK - - DJ - - DM - - DO - - EC - - EG - - SV - - GQ - - ER - - EE - - SZ - - ET - - FK - - FO - - FJ - - FI - - FR - - GF - - PF - - TF - - GA - - GM - - GE - - DE - - GH - - GI - - GR - - GL - - GD - - GP - - GU - - GT - - GG - - GN - - GW - - GY - - HT - - HM - - VA - - HN - - HK - - HU - - IS - - IN - - ID - - IR - - IQ - - IE - - IM - - IL - - IT - - JM - - JP - - JE - - JO - - KZ - - KE - - KI - - KW - - KG - - LA - - LV - - LB - - LS - - LR - - LY - - LI - - LT - - LU - - MO - - MG - - MW - - MY - - MV - - ML - - MT - - MH - - MQ - - MR - - MU - - YT - - MX - - FM - - MD - - MC - - MN - - ME - - MS - - MA - - MZ - - MM - - NA - - NR - - NP - - NL - - NC - - NZ - - NI - - NE - - NG - - NU - - NF - - KP - - MK - - MP - - NO - - OM - - PK - - PW - - PS - - PA - - PG - - PY - - PE - - PH - - PN - - PL - - PT - - PR - - QA - - RE - - RO - - RU - - RW - - BL - - SH - - KN - - LC - - MF - - PM - - VC - - WS - - SM - - ST - - SA - - SN - - RS - - SC - - SL - - SG - - SX - - SK - - SI - - SB - - SO - - ZA - - GS - - KR - - SS - - ES - - LK - - SD - - SR - - SJ - - SE - - CH - - SY - - TW - - TJ - - TZ - - TH - - TL - - TG - - TK - - TO - - TT - - TN - - TR - - TM - - TC - - TV - - UG - - UA - - AE - - GB - - UM - - US - - UY - - UZ - - VU - - VE - - VN - - VG - - VI - - WF - - EH - - YE - - ZM - - ZW - type: string - description: |- - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - x-merge-category: accounting - CreateFieldMappingRequest: - type: object - properties: - target_field_name: - type: string - minLength: 1 - description: The name of the target field you want this remote field to - map to. - example: example_target_field_name - target_field_description: - type: string - minLength: 1 - description: The description of the target field you want this remote field - to map to. - example: this is a example description of the target field - remote_field_traversal_path: - type: array - items: {} - description: The field traversal path of the remote field listed when you - hit the GET /remote-fields endpoint. - example: - - example_remote_field - remote_method: - type: string - minLength: 1 - description: The method of the remote endpoint where the remote field is - coming from. - example: GET - remote_url_path: - type: string - minLength: 1 - description: The path of the remote endpoint where the remote field is coming - from. - example: /example-url-path - common_model_name: - type: string - minLength: 1 - description: The name of the Common Model that the remote field corresponds - to in a given category. - example: ExampleCommonModel - required: - - common_model_name - - remote_field_traversal_path - - remote_method - - remote_url_path - - target_field_description - - target_field_name - x-merge-category: accounting - CreditNote: - type: object - description: |- - # The CreditNote Object - ### Description - A `CreditNote` is transaction issued to a customer, indicating a reduction or cancellation of the amount owed by the customer. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a sales transaction. A `CreditNote` can be applied to *Accounts Receivable* Invoices to decrease the overall amount of the Invoice. - - ### Usage Example - Fetch from the `LIST CreditNotes` endpoint and view a company's credit notes. - properties: - id: - type: string - format: uuid - readOnly: true - example: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '123877' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - transaction_date: - type: string - format: date-time - nullable: true - description: The credit note's transaction date. - example: '2020-03-31T00:00:00Z' - status: - oneOf: - - $ref: '#/components/schemas/CreditNoteStatusEnum' - - type: string - nullable: true - description: |- - The credit note's status. - - * `SUBMITTED` - SUBMITTED - * `AUTHORIZED` - AUTHORIZED - * `PAID` - PAID - example: PAID - number: - type: string - nullable: true - description: The credit note's number. - example: CN-29 - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The credit note's contact. - example: c6c7b870-bb4d-489a-921e-2f0ee4192ff9 - x-merge-expands-to: Contact - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the credit note belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The credit note's exchange rate. - example: '2.9' - total_amount: - type: number - format: double - nullable: true - description: The credit note's total amount. - example: 50 - remaining_credit: - type: number - format: double - nullable: true - description: The amount of value remaining in the credit note that the customer - can use. - example: 20 - inclusive_of_tax: - type: boolean - nullable: true - description: If the transaction is inclusive or exclusive of tax. `True` - if inclusive, `False` if exclusive. - line_items: - type: array - items: - $ref: '#/components/schemas/CreditNoteLineItem' - readOnly: true - example: - - item: 0e3fd929-436c-4fd4-a48b-0c61f68d6178 - name: Basic Monthly - description: prorated amount for items - quantity: 1 - memo: privNote - unit_price: '5.0' - tax_rate: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - total_line_amount: '5.0' - tracking_categories: - - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - contact: 908934-49j9-093f-0989-908923908 - account: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_id: '121222' - remote_was_deleted: true - x-merge-expands-to: CreditNoteLineItem - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - x-merge-expands-to: TrackingCategory - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The credit note's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's credit note was created. - example: '2020-03-31T00:00:00Z' - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's credit note was updated. - example: '2020-03-31T00:00:00Z' - payments: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Payment' - nullable: true - example: - - b26fd49a-cbae-470a-a8f8-bcbc119e0390 - description: Array of `Payment` object IDs - x-merge-expands-to: Payment - applied_payments: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PaymentLineItem' - nullable: true - example: - - a9a94a75-19c1-41fe-90d8-d9ba959c38e5 - description: A list of the Payment Applied to Lines common models related - to a given Invoice, Credit Note, or Journal Entry. - x-merge-expands-to: PaymentLineItemWithPayment - accounting_period: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/AccountingPeriod' - nullable: true - description: The accounting period that the CreditNote was generated in. - example: b38c59b0-a9d7-4740-b1ee-5436c6751e3d - x-merge-expands-to: AccountingPeriod - applied_to_lines: - type: array - items: - $ref: '#/components/schemas/CreditNoteApplyLineForCreditNote' - description: A list of the CreditNote Applied to Lines common models related - to a given Credit Note - example: - - invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - x-merge-expands: '{"accounting_period": "AccountingPeriod", "applied_payments": - "PaymentLineItemWithPayment", "company": "CompanyInfo", "contact": "Contact", - "line_items": "CreditNoteLineItem", "payments": "Payment", "tracking_categories": - "TrackingCategory"}' - x-merge-category: accounting - CreditNoteApplyLineForCreditNote: - type: object - description: |- - # The CreditNoteApplyLine Object - ### Description - The `CreditNoteApplyLine` is attached to the CreditNote model. - - ### Usage Example - Fetch from the `GET CreditNote` endpoint and view the invoice's applied to lines. - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '088899' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - invoice: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Invoice' - nullable: true - example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - x-merge-expands-to: Invoice - applied_date: - type: string - format: date-time - nullable: true - description: Date that the credit note is applied to the invoice. - example: '2020-03-31T00:00:00Z' - applied_amount: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The amount of the Credit Note applied to the invoice. - example: '2.9' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - x-merge-nested-write-allowed: true - x-merge-expands: '{"invoice": "Invoice"}' - x-merge-category: accounting - CreditNoteApplyLineForCreditNoteRequest: - type: object - description: |- - # The CreditNoteApplyLine Object - ### Description - The `CreditNoteApplyLine` is attached to the CreditNote model. - - ### Usage Example - Fetch from the `GET CreditNote` endpoint and view the invoice's applied to lines. - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '088899' - invoice: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Invoice' - nullable: true - example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - x-merge-expands-to: Invoice - applied_date: - type: string - format: date-time - nullable: true - description: Date that the credit note is applied to the invoice. - example: '2020-03-31T00:00:00Z' - applied_amount: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The amount of the Credit Note applied to the invoice. - example: '2.9' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"invoice": "Invoice"}' - x-merge-category: accounting - CreditNoteApplyLineForInvoice: - type: object - description: |- - # The CreditNoteApplyLine Object - ### Description - The `CreditNoteApplyLine` is attached to the CreditNote model. - - ### Usage Example - Fetch from the `GET CreditNote` endpoint and view the invoice's applied to lines. - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '088899' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - credit_note: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CreditNote' - nullable: true - example: dd7ae92086acb2fc9c2739de564ef8e9571f7263 - x-merge-expands-to: CreditNote - applied_date: - type: string - format: date-time - nullable: true - description: Date that the credit note is applied to the invoice. - example: '2020-03-31T00:00:00Z' - applied_amount: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The amount of the Credit Note applied to the invoice. - example: '2.9' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - x-merge-nested-write-allowed: true - x-merge-expands: '{"credit_note": "CreditNote"}' - x-merge-category: accounting - CreditNoteEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/CreditNoteRequest' - required: - - model - x-merge-category: accounting - CreditNoteLineItem: - type: object - description: |- - # The CreditNoteLineItem Object - ### Description - The `CreditNoteLineItem` object is used to represent a credit note's line items. - - ### Usage Example - Fetch from the `GET CreditNote` endpoint and view the credit note's line items. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '121222' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - item: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Item' - nullable: true - example: 0e3fd929-436c-4fd4-a48b-0c61f68d6178 - x-merge-expands-to: Item - name: - type: string - nullable: true - description: The credit note line item's name. - example: Basic Monthly - description: - type: string - nullable: true - description: The description of the item that is owed. - example: prorated amount for items - quantity: - type: string - format: decimal - pattern: ^-?\d{0,24}(?:\.\d{0,8})?$ - nullable: true - description: The credit note line item's quantity. - example: 1 - memo: - type: string - nullable: true - description: The credit note line item's memo. - example: privNote - unit_price: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The credit note line item's unit price. - example: '5.0' - tax_rate: - type: string - format: uuid - nullable: true - example: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - description: The tax rate that applies to this line item. - total_line_amount: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The credit note line item's total. - example: '5.0' - tracking_category: - type: string - format: uuid - nullable: true - description: The credit note line item's associated tracking category. - deprecated: true - tracking_categories: - type: array - items: - type: string - format: uuid - nullable: true - example: - - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: The credit note line item's associated tracking categories. - account: - type: string - format: uuid - nullable: true - description: The credit note line item's account. - example: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the credit note belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The credit note's contact. - example: 908934-49j9-093f-0989-908923908 - x-merge-expands-to: Contact - project: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Project' - nullable: true - example: 22e65a5d-2df5-4e6e-884a-e538d0339000 - x-merge-expands-to: Project - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - example: true - x-merge-nested-write-allowed: true - x-merge-expands: '{"company": "CompanyInfo", "contact": "Contact", "item": "Item", - "project": "Project"}' - x-merge-category: accounting - CreditNoteLineItemRequest: - type: object - description: |- - # The CreditNoteLineItem Object - ### Description - The `CreditNoteLineItem` object is used to represent a credit note's line items. - - ### Usage Example - Fetch from the `GET CreditNote` endpoint and view the credit note's line items. - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '121222' - item: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Item' - nullable: true - example: 0e3fd929-436c-4fd4-a48b-0c61f68d6178 - x-merge-expands-to: Item - name: - type: string - nullable: true - description: The credit note line item's name. - example: Basic Monthly - description: - type: string - nullable: true - description: The description of the item that is owed. - example: prorated amount for items - quantity: - type: string - format: decimal - pattern: ^-?\d{0,24}(?:\.\d{0,8})?$ - nullable: true - description: The credit note line item's quantity. - example: 1 - memo: - type: string - nullable: true - description: The credit note line item's memo. - example: privNote - unit_price: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The credit note line item's unit price. - example: '5.0' - tax_rate: - type: string - format: uuid - nullable: true - example: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - description: The tax rate that applies to this line item. - total_line_amount: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The credit note line item's total. - example: '5.0' - tracking_category: - type: string - format: uuid - nullable: true - description: The credit note line item's associated tracking category. - deprecated: true - tracking_categories: - type: array - items: - type: string - format: uuid - nullable: true - example: - - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: The credit note line item's associated tracking categories. - account: - type: string - format: uuid - nullable: true - description: The credit note line item's account. - example: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the credit note belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The credit note's contact. - example: 908934-49j9-093f-0989-908923908 - x-merge-expands-to: Contact - project: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Project' - nullable: true - example: 22e65a5d-2df5-4e6e-884a-e538d0339000 - x-merge-expands-to: Project - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"company": "CompanyInfo", "contact": "Contact", "item": "Item", - "project": "Project"}' - x-merge-category: accounting - CreditNoteRequest: - type: object - description: |- - # The CreditNote Object - ### Description - A `CreditNote` is transaction issued to a customer, indicating a reduction or cancellation of the amount owed by the customer. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a sales transaction. A `CreditNote` can be applied to *Accounts Receivable* Invoices to decrease the overall amount of the Invoice. - - ### Usage Example - Fetch from the `LIST CreditNotes` endpoint and view a company's credit notes. - properties: - transaction_date: - type: string - format: date-time - nullable: true - description: The credit note's transaction date. - example: '2020-03-31T00:00:00Z' - status: - oneOf: - - $ref: '#/components/schemas/CreditNoteStatusEnum' - - type: string - nullable: true - description: |- - The credit note's status. - - * `SUBMITTED` - SUBMITTED - * `AUTHORIZED` - AUTHORIZED - * `PAID` - PAID - example: PAID - number: - type: string - nullable: true - description: The credit note's number. - example: CN-29 - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The credit note's contact. - example: c6c7b870-bb4d-489a-921e-2f0ee4192ff9 - x-merge-expands-to: Contact - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the credit note belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The credit note's exchange rate. - example: '2.9' - total_amount: - type: number - format: double - nullable: true - description: The credit note's total amount. - example: 50 - remaining_credit: - type: number - format: double - nullable: true - description: The amount of value remaining in the credit note that the customer - can use. - example: 20 - inclusive_of_tax: - type: boolean - nullable: true - description: If the transaction is inclusive or exclusive of tax. `True` - if inclusive, `False` if exclusive. - line_items: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CreditNoteLineItemRequest' - example: - - item: 0e3fd929-436c-4fd4-a48b-0c61f68d6178 - name: Basic Monthly - description: prorated amount for items - quantity: 1 - memo: privNote - unit_price: '5.0' - tax_rate: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - total_line_amount: '5.0' - tracking_categories: - - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - contact: 908934-49j9-093f-0989-908923908 - account: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_id: '121222' - remote_was_deleted: true - x-merge-expands-to: CreditNoteLineItem - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - x-merge-expands-to: TrackingCategory - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The credit note's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - payments: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Payment' - nullable: true - example: - - b26fd49a-cbae-470a-a8f8-bcbc119e0390 - description: Array of `Payment` object IDs - x-merge-expands-to: Payment - applied_payments: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PaymentLineItem' - nullable: true - example: - - a9a94a75-19c1-41fe-90d8-d9ba959c38e5 - description: A list of the Payment Applied to Lines common models related - to a given Invoice, Credit Note, or Journal Entry. - x-merge-expands-to: PaymentLineItemWithPayment - accounting_period: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/AccountingPeriod' - nullable: true - description: The accounting period that the CreditNote was generated in. - example: b38c59b0-a9d7-4740-b1ee-5436c6751e3d - x-merge-expands-to: AccountingPeriod - applied_to_lines: - type: array - items: - $ref: '#/components/schemas/CreditNoteApplyLineForCreditNoteRequest' - description: A list of the CreditNote Applied to Lines common models related - to a given Credit Note - example: - - invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"accounting_period": "AccountingPeriod", "applied_payments": - "PaymentLineItemWithPayment", "company": "CompanyInfo", "contact": "Contact", - "line_items": "CreditNoteLineItem", "payments": "Payment", "tracking_categories": - "TrackingCategory"}' - x-merge-category: accounting - CreditNoteResponse: - type: object - properties: - model: - $ref: '#/components/schemas/CreditNote' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: accounting - CreditNoteStatusEnum: - enum: - - SUBMITTED - - AUTHORIZED - - PAID - type: string - description: |- - * `SUBMITTED` - SUBMITTED - * `AUTHORIZED` - AUTHORIZED - * `PAID` - PAID - x-merge-category: accounting - CreditOrDebitEnum: - enum: - - CREDIT - - DEBIT - type: string - description: |- - * `CREDIT` - CREDIT - * `DEBIT` - DEBIT - x-merge-category: accounting - DataPassthroughRequest: - type: object - description: |- - # The DataPassthrough Object - ### Description - The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. - - ### Usage Example - Create a `DataPassthrough` to get team hierarchies from your Rippling integration. - properties: - method: - allOf: - - $ref: '#/components/schemas/MethodEnum' - example: POST - path: - type: string - minLength: 1 - description: The path of the request in the third party's platform. - example: /scooters - base_url_override: - type: string - nullable: true - minLength: 1 - description: An optional override of the third party's base url for the - request. - example: https://api.example.com - data: - type: string - nullable: true - minLength: 1 - description: The data with the request. You must include a `request_format` - parameter matching the data's format - example: '{"company": "Lime", "model": "Gen 2.5"}' - multipart_form_data: - type: array - items: - $ref: '#/components/schemas/MultipartFormFieldRequest' - nullable: true - description: Pass an array of `MultipartFormField` objects in here instead - of using the `data` param if `request_format` is set to `MULTIPART`. - headers: - type: object - additionalProperties: {} - nullable: true - description: The headers to use for the request (Merge will handle the account's - authorization headers). `Content-Type` header is required for passthrough. - Choose content type corresponding to expected format of receiving server. - example: - EXTRA-HEADER: value - request_format: - allOf: - - $ref: '#/components/schemas/RequestFormatEnum' - nullable: true - example: JSON - normalize_response: - type: boolean - description: 'Optional. If true, the response will always be an object of - the form `{"type": T, "value": ...}` where `T` will be one of `string, - boolean, number, null, array, object`.' - required: - - method - - path - x-merge-category: accounting - DebugModeLog: - type: object - properties: - log_id: - type: string - example: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: - type: string - example: https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - $ref: '#/components/schemas/DebugModelLogSummary' - example: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - required: - - dashboard_view - - log_id - - log_summary - x-merge-sample-json: '{"log_id": "99433219-8017-4acd-bb3c-ceb23d663832", "dashboard_view": - "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832", "log_summary": - {"url": "www.exampleintegration.com/api/v1/exampleapi", "method": "POST", - "status_code": 200}}' - x-merge-category: accounting - DebugModelLogSummary: - type: object - properties: - url: - type: string - example: www.exampleintegration.com/api/v1/exampleapi - method: - type: string - example: POST - status_code: - type: integer - example: 200 - required: - - method - - status_code - - url - x-merge-sample-json: '{"url": "www.exampleintegration.com/api/v1/exampleapi", - "method": "POST", "status_code": 200}' - x-merge-category: accounting - Employee: - type: object - description: |- - # The Employee Object - ### Description - An `Employee` is an individual who works for the company of the linked account. The `Employee` model contains both contractors and full time employees. - * An `Employee` is a contractor if `is_contractor` property is `True` - * An `Employee` is a full time employee if `is_contractor` property is `False` - - ### Usage Example - Fetch from the `LIST Employees` endpoint and view a company's employees. - properties: - id: - type: string - format: uuid - readOnly: true - example: c640b80b-fac9-409f-aa19-1f9221aec445 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '11167' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - first_name: - type: string - nullable: true - description: The employee's first name. - maxLength: 255 - example: John - last_name: - type: string - nullable: true - description: The employee's last name. - maxLength: 255 - example: Smith - is_contractor: - type: boolean - nullable: true - description: '`True` if the employee is a contractor, `False` if not.' - example: true - employee_number: - type: string - nullable: true - description: The employee's internal identification number. - maxLength: 50 - example: '325462' - email_address: - type: string - nullable: true - description: The employee's email address. - example: johnsmith@merge.dev - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The subsidiary that the employee belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - status: - oneOf: - - $ref: '#/components/schemas/Status895Enum' - - type: string - description: |- - The employee's status in the accounting system. - - * `ACTIVE` - ACTIVE - * `INACTIVE` - INACTIVE - example: ACTIVE - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - required: - - status - x-merge-expands: '{"company": "Company", "employments": "Employment", "groups": - "Group", "home_location": "Location", "manager": "Employee", "pay_group": - "PayGroup", "team": "Team", "work_location": "Location"}' - x-merge-category: accounting - EnabledActionsEnum: - enum: - - READ - - WRITE - type: string - description: |- - * `READ` - READ - * `WRITE` - WRITE - x-merge-category: accounting - EncodingEnum: - enum: - - RAW - - BASE64 - - GZIP_BASE64 - type: string - description: |- - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - x-merge-category: accounting - EndUserDetailsRequest: - type: object - properties: - end_user_email_address: - type: string - minLength: 1 - description: Your end user's email address. This is purely for identification - purposes - setting this value will not cause any emails to be sent. - maxLength: 100 - example: example@gmail.com - end_user_organization_name: - type: string - minLength: 1 - description: Your end user's organization. - maxLength: 100 - example: Test Organization - end_user_origin_id: - type: string - minLength: 1 - description: This unique identifier typically represents the ID for your - end user in your product's database. This value must be distinct from - other Linked Accounts' unique identifiers. - maxLength: 100 - example: '12345' - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - description: The integration categories to show in Merge Link. - example: - - hris - - ats - integration: - type: string - nullable: true - minLength: 1 - description: The slug of a specific pre-selected integration for this linking - flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. - example: bamboohr - link_expiry_mins: - type: integer - maximum: 10080 - minimum: 30 - default: 30 - description: An integer number of minutes between [30, 720 or 10080 if for - a Magic Link URL] for how long this token is valid. Defaults to 30. - should_create_magic_link_url: - type: boolean - nullable: true - default: false - description: Whether to generate a Magic Link URL. Defaults to false. For - more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - hide_admin_magic_link: - type: boolean - nullable: true - default: false - description: Whether to generate a Magic Link URL on the Admin Needed screen - during the linking flow. Defaults to false. For more information on Magic - Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - common_models: - type: array - items: - $ref: '#/components/schemas/CommonModelScopesBodyRequest' - nullable: true - description: An array of objects to specify the models and fields that will - be disabled for a given Linked Account. Each object uses model_id, enabled_actions, - and disabled_fields to specify the model, method, and fields that are - scoped for a given Linked Account. - category_common_model_scopes: - type: object - additionalProperties: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' - nullable: true - description: When creating a Link Token, you can set permissions for Common - Models that will apply to the account that is going to be linked. Any - model or field not specified in link token payload will default to existing - settings. - example: - hris: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - field_permissions: - enabled_fields: - - first_name - - last_name - - personal_email - disabled_fields: - - preferred_name - - model_name: Employment - model_permissions: - READ: - is_enabled: false - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - effective_date - ats: - - model_name: Job - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - field_permissions: - enabled_fields: - - name - disabled_fields: - - description - - model_name: Department - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - language: - oneOf: - - $ref: '#/components/schemas/LanguageEnum' - - type: string - nullable: true - description: |- - The following subset of IETF language tags can be used to configure localization. - - * `en` - en - * `de` - de - example: en - are_syncs_disabled: - type: boolean - nullable: true - default: false - description: The boolean that indicates whether initial, periodic, and force - syncs will be disabled. - integration_specific_config: - type: object - additionalProperties: {} - nullable: true - description: A JSON object containing integration-specific configuration - options. - example: - rippling: - oauth_code: 3h1jj8ssdf31dfji3o1jjdfjasd - required: - - categories - - end_user_email_address - - end_user_organization_name - - end_user_origin_id - x-merge-category: accounting - ErrorValidationProblem: - type: object - properties: - source: - $ref: '#/components/schemas/ValidationProblemSource' - example: - pointer: /model/custom_fields - title: - type: string - example: Missing Required Field - detail: - type: string - example: custom_fields is a required field on model. - problem_type: - type: string - example: MISSING_REQUIRED_FIELD - required: - - detail - - problem_type - - title - x-merge-category: accounting - EventTypeEnum: - enum: - - CREATED_REMOTE_PRODUCTION_API_KEY - - DELETED_REMOTE_PRODUCTION_API_KEY - - CREATED_TEST_API_KEY - - DELETED_TEST_API_KEY - - REGENERATED_PRODUCTION_API_KEY - - REGENERATED_WEBHOOK_SIGNATURE - - INVITED_USER - - TWO_FACTOR_AUTH_ENABLED - - TWO_FACTOR_AUTH_DISABLED - - DELETED_LINKED_ACCOUNT - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - CREATED_DESTINATION - - DELETED_DESTINATION - - CHANGED_DESTINATION - - CHANGED_SCOPES - - CHANGED_PERSONAL_INFORMATION - - CHANGED_ORGANIZATION_SETTINGS - - ENABLED_INTEGRATION - - DISABLED_INTEGRATION - - ENABLED_CATEGORY - - DISABLED_CATEGORY - - CHANGED_PASSWORD - - RESET_PASSWORD - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - FORCED_LINKED_ACCOUNT_RESYNC - - MUTED_ISSUE - - GENERATED_MAGIC_LINK - - ENABLED_MERGE_WEBHOOK - - DISABLED_MERGE_WEBHOOK - - MERGE_WEBHOOK_TARGET_CHANGED - - END_USER_CREDENTIALS_ACCESSED - type: string - description: |- - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - * `INVITED_USER` - INVITED_USER - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - * `CREATED_DESTINATION` - CREATED_DESTINATION - * `DELETED_DESTINATION` - DELETED_DESTINATION - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - * `CHANGED_SCOPES` - CHANGED_SCOPES - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - * `RESET_PASSWORD` - RESET_PASSWORD - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - * `MUTED_ISSUE` - MUTED_ISSUE - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - x-merge-category: accounting - Expense: - type: object - description: |- - # The Expense Object - ### Description - The `Expense` object is used to represent a direct purchase by a business, typically made with a check, credit card, or cash. Each `Expense` object is dedicated to a grouping of expenses, with each expense recorded in the lines object. - - The `Expense` object is used also used to represent refunds to direct purchases. Refunds can be distinguished from purchases by the amount sign of the records. Expense objects with a negative amount are purchases and `Expense` objects with a positive amount are refunds to those purchases. - - ### Usage Example - Fetch from the `GET Expense` endpoint and view a company's expense. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '088899' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - transaction_date: - type: string - format: date-time - nullable: true - description: When the transaction occurred. - remote_created_at: - type: string - format: date-time - nullable: true - description: When the expense was created. - example: '2020-03-31T00:00:00Z' - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The expense's payment account. - example: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - x-merge-expands-to: Account - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The expense's contact. - example: 3d263469-51a1-4766-9205-f6c997826be1 - x-merge-expands-to: Contact - total_amount: - type: number - format: double - nullable: true - description: The expense's total amount. - example: 10000 - sub_total: - type: number - format: double - nullable: true - description: The expense's total amount before tax. - total_tax_amount: - type: number - format: double - nullable: true - description: The expense's total tax amount. - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The expense's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The expense's exchange rate. - example: '2.9' - inclusive_of_tax: - type: boolean - nullable: true - description: If the transaction is inclusive or exclusive of tax. `True` - if inclusive, `False` if exclusive. - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the expense belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee this overall transaction relates to. - example: 7442f0d5-722d-45bd-b807-6e38489d37fe - x-merge-expands-to: Employee - memo: - type: string - nullable: true - description: The expense's private note. - example: New employee supplies - lines: - type: array - items: - $ref: '#/components/schemas/ExpenseLine' - example: - - remote_id: '121222' - net_amount: 25.54 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - employee: 7442f0d5-722d-45bd-b807-6e38489d37fe - item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d - account: 2a56344a-a491-11ec-b909-0242ac120002 - contact: c640b80b-fac9-409f-aa19-1f9221aec445 - description: MacBook Pro - exchange_rate: '2.9' - remote_was_deleted: false - - remote_id: '121223' - net_amount: 10 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d - account: 2a56344a-a491-11ec-b909-0242ac120002 - description: Desk Lamp - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - x-merge-expands-to: TrackingCategory - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - accounting_period: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/AccountingPeriod' - nullable: true - description: The accounting period that the Expense was generated in. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: AccountingPeriod - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-expands: '{"account": "Account", "accounting_period": "AccountingPeriod", - "company": "CompanyInfo", "contact": "Contact", "employee": "Employee", "tracking_categories": - "TrackingCategory"}' - x-merge-category: accounting - ExpenseEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/ExpenseRequest' - required: - - model - x-merge-category: accounting - ExpenseLine: - type: object - description: |- - # The ExpenseLine Object - ### Description - The `ExpenseLine` object is used to represent an expense's line items. - - ### Usage Example - Fetch from the `GET Expense` endpoint and view the expense's line items. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '121222' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - item: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Item' - nullable: true - description: The line's item. - example: b38c59b0-a9d7-4740-b1ee-5436c6751e3d - x-merge-expands-to: Item - net_amount: - type: number - format: double - nullable: true - description: The line's net amount. - example: 25.54 - tracking_category: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - deprecated: true - x-merge-expands-to: TrackingCategory - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: The expense line item's associated tracking categories. - x-merge-expands-to: TrackingCategory - company: - type: string - format: uuid - nullable: true - description: The company the expense belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee this overall transaction relates to. - example: 7442f0d5-722d-45bd-b807-6e38489d37fe - x-merge-expands-to: Employee - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - = type: string - nullable: true - description: |- - The expense line item's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The expense's payment account. - example: 2a56344a-a491-11ec-b909-0242ac120002 - x-merge-expands-to: Account - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The expense's contact. - example: c640b80b-fac9-409f-aa19-1f9221aec445 - x-merge-expands-to: Contact - project: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Project' - nullable: true - example: 22e65a5d-2df5-4e6e-884a-e538d0339000 - x-merge-expands-to: Project - description: - type: string - nullable: true - description: The description of the item that was purchased by the company. - example: MacBook Pro - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The expense line item's exchange rate. - example: '2.9' - tax_rate: - type: string - format: uuid - nullable: true - example: a12e7c20-1922-9df7-s75n-edfeewnn7384 - description: The tax rate that applies to this line item. - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - x-merge-nested-write-allowed: true - x-merge-expands: '{"account": "Account", "contact": "Contact", "employee": "Employee", - "item": "Item", "project": "Project", "tracking_categories": "TrackingCategory", - "tracking_category": "TrackingCategory"}' - x-merge-category: accounting - ExpenseLineRequest: - type: object - description: |- - # The ExpenseLine Object - ### Description - The `ExpenseLine` object is used to represent an expense's line items. - - ### Usage Example - Fetch from the `GET Expense` endpoint and view the expense's line items. - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '121222' - item: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Item' - nullable: true - description: The line's item. - example: b38c59b0-a9d7-4740-b1ee-5436c6751e3d - x-merge-expands-to: Item - net_amount: - type: number - format: double - nullable: true - description: The line's net amount. - example: 25.54 - tracking_category: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - deprecated: true - x-merge-expands-to: TrackingCategory - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: The expense line item's associated tracking categories. - x-merge-expands-to: TrackingCategory - company: - type: string - format: uuid - nullable: true - description: The company the expense belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee this overall transaction relates to. - example: 7442f0d5-722d-45bd-b807-6e38489d37fe - x-merge-expands-to: Employee - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The expense line item's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The expense's payment account. - example: 2a56344a-a491-11ec-b909-0242ac120002 - x-merge-expands-to: Account - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The expense's contact. - example: c640b80b-fac9-409f-aa19-1f9221aec445 - x-merge-expands-to: Contact - project: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Project' - nullable: true - example: 22e65a5d-2df5-4e6e-884a-e538d0339000 - x-merge-expands-to: Project - description: - type: string - nullable: true - description: The description of the item that was purchased by the company. - example: MacBook Pro - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The expense line item's exchange rate. - example: '2.9' - tax_rate: - type: string - format: uuid - nullable: true - example: a12e7c20-1922-9df7-s75n-edfeewnn7384 - description: The tax rate that applies to this line item. - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"account": "Account", "contact": "Contact", "employee": "Employee", - "item": "Item", "project": "Project", "tracking_categories": "TrackingCategory", - "tracking_category": "TrackingCategory"}' - x-merge-category: accounting - ExpenseRequest: - type: object - description: |- - # The Expense Object - ### Description - The `Expense` object is used to represent a direct purchase by a business, typically made with a check, credit card, or cash. Each `Expense` object is dedicated to a grouping of expenses, with each expense recorded in the lines object. - - The `Expense` object is used also used to represent refunds to direct purchases. Refunds can be distinguished from purchases by the amount sign of the records. Expense objects with a negative amount are purchases and `Expense` objects with a positive amount are refunds to those purchases. - - ### Usage Example - Fetch from the `GET Expense` endpoint and view a company's expense. - properties: - transaction_date: - type: string - format: date-time - nullable: true - description: When the transaction occurred. - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The expense's payment account. - example: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - x-merge-expands-to: Account - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The expense's contact. - example: 3d263469-51a1-4766-9205-f6c997826be1 - x-merge-expands-to: Contact - total_amount: - type: number - format: double - nullable: true - description: The expense's total amount. - example: 10000 - sub_total: - type: number - format: double - nullable: true - description: The expense's total amount before tax. - total_tax_amount: - type: number - format: double - nullable: true - description: The expense's total tax amount. - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - = type: string - nullable: true - description: |- - The expense's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The expense's exchange rate. - example: '2.9' - inclusive_of_tax: - type: boolean - nullable: true - description: If the transaction is inclusive or exclusive of tax. `True` - if inclusive, `False` if exclusive. - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the expense belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee this overall transaction relates to. - example: 7442f0d5-722d-45bd-b807-6e38489d37fe - x-merge-expands-to: Employee - memo: - type: string - nullable: true - description: The expense's private note. - example: New employee supplies - lines: - type: array - items: - $ref: '#/components/schemas/ExpenseLineRequest' - example: - - remote_id: '121222' - net_amount: 25.54 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - employee: 7442f0d5-722d-45bd-b807-6e38489d37fe - item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d - account: 2a56344a-a491-11ec-b909-0242ac120002 - contact: c640b80b-fac9-409f-aa19-1f9221aec445 - description: MacBook Pro - exchange_rate: '2.9' - remote_was_deleted: false - - remote_id: '121223' - net_amount: 10 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d - account: 2a56344a-a491-11ec-b909-0242ac120002 - description: Desk Lamp - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - x-merge-expands-to: TrackingCategory - accounting_period: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/AccountingPeriod' - nullable: true - description: The accounting period that the Expense was generated in. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: AccountingPeriod - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"account": "Account", "accounting_period": "AccountingPeriod", - "company": "CompanyInfo", "contact": "Contact", "employee": "Employee", "tracking_categories": - "TrackingCategory"}' - x-merge-category: accounting - ExpenseResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Expense' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: accounting - ExternalTargetFieldAPI: - type: object - properties: - name: - type: string - nullable: true - readOnly: true - example: example_target_field_name - description: - type: string - nullable: true - readOnly: true - example: this is a example description of a target field - is_mapped: - type: string - nullable: true - readOnly: true - example: true - x-merge-category: accounting - ExternalTargetFieldAPIResponse: - type: object - properties: - Account: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - AccountingAttachment: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - BalanceSheet: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - CashFlowStatement: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - CompanyInfo: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Contact: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - IncomeStatement: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - CreditNote: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Item: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - PurchaseOrder: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - TrackingCategory: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - JournalEntry: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - TaxRate: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Invoice: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Payment: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Expense: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - VendorCredit: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Transaction: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - AccountingPeriod: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - GeneralLedgerTransaction: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - BankFeedAccount: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Employee: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - PaymentMethod: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Project: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - PaymentTerm: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - x-merge-category: accounting - FeedStatusEnum: - enum: - - ACTIVE - - INACTIVE - type: string - description: |- - * `ACTIVE` - ACTIVE - * `INACTIVE` - INACTIVE - x-merge-category: accounting - FieldFormatEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - type: string - description: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - x-merge-category: accounting - FieldMappingApiInstance: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: - type: boolean - readOnly: true - target_field: - type: object - properties: - name: - type: string - description: - type: string - is_organization_wide: - type: boolean - required: - - description - - is_organization_wide - - name - nullable: true - readOnly: true - example: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - type: object - properties: - remote_key_name: - type: string - nullable: true - schema: - type: object - additionalProperties: {} - nullable: true - remote_endpoint_info: - type: object - properties: - method: - type: string - nullable: true - url_path: - type: string - nullable: true - field_traversal_path: - type: array - items: - type: string - nullable: true - required: - - field_traversal_path - - method - - url_path - required: - - remote_endpoint_info - - remote_key_name - - schema - nullable: true - readOnly: true - example: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - x-merge-category: accounting - FieldMappingApiInstanceResponse: - type: object - properties: - Account: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - AccountingAttachment: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - BalanceSheet: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - CashFlowStatement: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - CompanyInfo: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Contact: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - IncomeStatement: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - CreditNote: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Item: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - PurchaseOrder: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - TrackingCategory: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - JournalEntry: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - TaxRate: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Invoice: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Payment: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Expense: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - VendorCredit: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Transaction: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - AccountingPeriod: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - GeneralLedgerTransaction: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - BankFeedAccount: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Employee: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - PaymentMethod: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Project: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - PaymentTerm: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - x-merge-category: accounting - FieldMappingInstanceResponse: - type: object - properties: - model: - $ref: '#/components/schemas/FieldMappingApiInstance' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: accounting - FieldPermissionDeserializer: - type: object - properties: - enabled_fields: - type: array - items: {} - disabled_fields: - type: array - items: {} - x-merge-category: accounting - FieldPermissionDeserializerRequest: - type: object - properties: - enabled_fields: - type: array - items: {} - disabled_fields: - type: array - items: {} - x-merge-category: accounting - FieldTypeEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - type: string - description: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - x-merge-category: accounting - GeneralLedgerTransaction: - type: object - description: |- - # The GeneralLedgerTransaction Object - ### Description - A General Ledger Entry is a record of a financial transaction that is posted to the general ledger, the central repository of a company’s financial data. - - The `GeneralLedgerTransaction` object is a singular endpoint to pull all transactions posted to a company’s general ledger. The transaction that generated the `GeneralLedgerTransaction` can be found by referencing the `underlying_transaction_type` and `underlying_transaction_remote_id` fields. - - The lines of a `GeneralLedgerTransaction` object will always have equal amounts of debits and credits. - - ### Usage Example - Fetch from the `GET GeneralLedgerTransaction` endpoint and view a general ledger transaction. - properties: - id: - type: string - format: uuid - readOnly: true - example: b26fd49a-cbae-470a-a8f8-bcbc119e0390 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '987300' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - underlying_transaction_remote_id: - type: string - nullable: true - description: The third party remote ID of the underlying transaction. - maxLength: 50 - example: '1234' - underlying_transaction_type: - oneOf: - - $ref: '#/components/schemas/UnderlyingTransactionTypeEnum' - - type: string - nullable: true - description: |- - The type of the underlying transaction. - - * `INVOICE` - INVOICE - * `EXPENSE` - EXPENSE - * `TRANSACTION` - TRANSACTION - * `JOURNAL_ENTRY` - JOURNAL_ENTRY - * `PAYMENT` - PAYMENT - * `VENDOR_CREDIT` - VENDOR_CREDIT - * `CREDIT_NOTE` - CREDIT_NOTE - example: INVOICE - accounting_period: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/AccountingPeriod' - nullable: true - description: The accounting period that the GeneralLedgerTransaction was - generated in. - example: d6e687d6-0c36-48a1-8114-35324b5cb38f - x-merge-expands-to: AccountingPeriod - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the GeneralLedgerTransaction belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's GeneralLedgerTransaction entry was updated. - example: '2020-03-31T00:00:00Z' - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's GeneralLedgerTransaction entry was created. - example: '2020-03-31T00:00:00Z' - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - x-merge-expands-to: TrackingCategory - posting_date: - type: string - format: date-time - nullable: true - description: The date that the transaction was posted to the general ledger. - example: '2020-03-31T00:00:00Z' - general_ledger_transaction_lines: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/GeneralLedgerTransactionLine' - readOnly: true - example: - - remote_id: '123' - account: a47e11b6-c73b-4a0c-be31-130fc48177fa - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - contact: d6e687d6-0c36-48a1-8114-35324b5cb38f - base_currency: USD - transaction_currency: USD - description: Invoice created - exchange_rate: 1 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - debit_amount: 0 - crebit_amount: 123.5 - item: a47e11b6-c73b-4a0c-be31-130fc48177fa - foreign_debit_amount: 0 - foreign_credit_amount: 123.5 - remote_was_deleted: false - remote_data: - - path: /actions - data: - - Varies by platform - description: A list of “General Ledger Transaction Applied to Lines” objects. - x-merge-expands-to: GeneralLedgerTransactionLine - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - x-merge-expands: '{"accounting_period": "AccountingPeriod", "company": "CompanyInfo", - "general_ledger_transaction_lines": "GeneralLedgerTransactionLine", "tracking_categories": - "TrackingCategory"}' - x-merge-category: accounting - GeneralLedgerTransactionLine: - type: object - description: |- - # The GeneralLedgerTransactionLineSerializer Object - ### Description - The `GeneralLedgerTransactionLineSerializer` object represents general ledger transaction line item. - - ### Usage Example Fetch from the `GET GeneralLedgerTransactionLineSerializer` endpoint and view an - `GeneralLedgerTransaction` line item. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '123' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - example: a47e11b6-c73b-4a0c-be31-130fc48177fa - x-merge-expands-to: Account - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the GeneralLedgerTransaction belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - example: 7442f0d5-722d-45bd-b807-6e38489d37fe - x-merge-expands-to: Employee - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - example: d6e687d6-0c36-48a1-8114-35324b5cb38f - x-merge-expands-to: Contact - project: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Project' - nullable: true - example: 22e65a5d-2df5-4e6e-884a-e538d0339000 - x-merge-expands-to: Project - base_currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - = type: string - nullable: true - description: |- - The base currency of the transaction - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - transaction_currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The transaction currency that the transaction is made in. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The exchange rate between the base currency and the transaction - currency. - example: 1 - description: - type: string - nullable: true - description: A description of the line item. - example: Invoice created - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - readOnly: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - debit_amount: - type: string - format: decimal - credit_amount: - type: string - format: decimal - item: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Item' - nullable: true - example: a47e11b6-c73b-4a0c-be31-130fc48177fa - x-merge-expands-to: Item - foreign_debit_amount: - type: string - format: decimal - foreign_credit_amount: - type: string - format: decimal - example: 123.5 - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - required: - - credit_amount - - debit_amount - - foreign_credit_amount - - foreign_debit_amount - x-merge-nested-write-allowed: true - x-merge-expands: '{"account": "Account", "company": "CompanyInfo", "contact": - "Contact", "employee": "Employee", "item": "Item", "project": "Project"}' - x-merge-category: accounting - GenerateRemoteKeyRequest: - type: object - description: |- - # The GenerateRemoteKey Object - ### Description - The `GenerateRemoteKey` object is used to represent a request for a new remote key. - - ### Usage Example - Post a `GenerateRemoteKey` to create a new remote key. - properties: - name: - type: string - minLength: 1 - description: The name of the remote key - example: Remote Deployment Key 1 - required: - - name - x-merge-category: accounting - IncomeStatement: - type: object - description: |- - # The IncomeStatement Object - ### Description - The `IncomeStatement` object is used to represent a company’s income, the cost of sales, operating expenses, and other non-operating expenses. The object also includes other important values like gross profit, gross operating profit, and net income. This represents a period of time (month, quarter, or year). - - ### Usage Example - Fetch from the `GET IncomeStatement` endpoint and view a company's income statement for a given period. - properties: - id: - type: string - format: uuid - readOnly: true - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '1342348' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The income statement's name. - example: IncomeStatement - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The income statement's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the income statement belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - start_period: - type: string - format: date-time - nullable: true - description: The income statement's start period. - end_period: - type: string - format: date-time - nullable: true - description: The income statement's end period. - income: - type: array - items: - $ref: '#/components/schemas/ReportItem' - readOnly: true - example: - - remote_id: '10299' - name: Total Income - value: 325 - sub_items: - - remote_id: '10200' - name: Landscaping Services - value: 425 - sub_items: [] - - remote_id: '10201' - name: Pest Control Services - value: -100 - sub_items: [] - cost_of_sales: - type: array - items: - $ref: '#/components/schemas/ReportItem' - readOnly: true - example: - - remote_id: '10299' - name: Total COGS - value: 25 - sub_items: - - remote_id: '10200' - name: Supplies - value: 10 - sub_items: [] - gross_profit: - type: number - format: double - nullable: true - description: The revenue minus the cost of sale. - example: 300 - operating_expenses: - type: array - items: - $ref: '#/components/schemas/ReportItem' - readOnly: true - example: - - remote_id: '10299' - name: Total Operating Expenses - value: 100 - sub_items: [] - net_operating_income: - type: number - format: double - nullable: true - description: The revenue minus the operating expenses. - example: 200 - non_operating_expenses: - type: array - items: - $ref: '#/components/schemas/ReportItem' - readOnly: true - example: - - remote_id: '10299' - name: Total Non-Operating Expenses - value: 100 - sub_items: [] - net_income: - type: number - format: double - nullable: true - description: The gross profit minus the total expenses. - example: 100 - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - x-merge-expands: '{"company": "CompanyInfo"}' - x-merge-category: accounting - IndividualCommonModelScopeDeserializer: - type: object - properties: - model_name: - type: string - model_permissions: - type: object - additionalProperties: - $ref: '#/components/schemas/ModelPermissionDeserializer' - field_permissions: - $ref: '#/components/schemas/FieldPermissionDeserializer' - required: - - model_name - x-merge-category: accounting - IndividualCommonModelScopeDeserializerRequest: - type: object - properties: - model_name: - type: string - minLength: 1 - model_permissions: - type: object - additionalProperties: - $ref: '#/components/schemas/ModelPermissionDeserializerRequest' - field_permissions: - $ref: '#/components/schemas/FieldPermissionDeserializerRequest' - required: - - model_name - x-merge-category: accounting - Invoice: - type: object - description: |- - # The Invoice Object - ### Description - The `Invoice` object represents an itemized record of goods and/or services sold to a customer or bought from a vendor. - - - Represents a Bill when the `Invoice` type is `ACCOUNTS_PAYABLE`. References an Invoice when the `Invoice` type is `ACCOUNTS_RECEIVABLE`. - - ### Usage Example - Fetch from the `LIST Invoices` endpoint and view a company's invoices. - properties: - id: - type: string - format: uuid - readOnly: true - example: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '990110' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - type: - oneOf: - - $ref: '#/components/schemas/InvoiceTypeEnum' - = type: string - nullable: true - description: |- - Whether the invoice is an accounts receivable or accounts payable. If `type` is `ACCOUNTS_PAYABLE`, the invoice is a bill. If `type` is `ACCOUNTS_RECEIVABLE`, it is an invoice. - - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - example: ACCOUNTS_RECEIVABLE - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The invoice's contact. - example: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 - x-merge-expands-to: Contact - number: - type: string - nullable: true - description: The invoice's number. - example: AIQ12546 - issue_date: - type: string - format: date-time - nullable: true - description: The invoice's issue date. - example: '2020-03-31T00:00:00Z' - due_date: - type: string - format: date-time - nullable: true - description: The invoice's due date. - example: '2020-04-15T00:00:00Z' - paid_on_date: - type: string - format: date-time - nullable: true - description: The invoice's paid date. - example: '2020-04-01T00:00:00Z' - memo: - type: string - nullable: true - description: The invoice's private note. - example: Weekly Payment - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the invoice belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee this overall transaction relates to. - example: 7442f0d5-722d-45bd-b807-6e38489d37fe - x-merge-expands-to: Employee - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The invoice's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The invoice's exchange rate. - example: '2.9' - payment_term: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PaymentTerm' - nullable: true - description: The payment term that applies to this transaction. - example: 89d329de-825f-4ac6-8369-3c58b4e68bee - x-merge-expands-to: PaymentTerm - total_discount: - type: number - format: double - nullable: true - description: The total discounts applied to the total cost. - sub_total: - type: number - format: double - nullable: true - description: The total amount being paid before taxes. - example: 100 - status: - oneOf: - - $ref: '#/components/schemas/InvoiceStatusEnum' - - type: string - nullable: true - description: |- - The status of the invoice. - - * `PAID` - PAID - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `PARTIALLY_PAID` - PARTIALLY_PAID - * `OPEN` - OPEN - * `VOID` - VOID - example: DRAFT - total_tax_amount: - type: number - format: double - nullable: true - description: The total amount being paid in taxes. - example: 5 - total_amount: - type: number - format: double - nullable: true - description: The invoice's total amount. - example: 105 - balance: - type: number - format: double - nullable: true - description: The invoice's remaining balance. - example: 105 - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's invoice entry was updated. - example: '2020-04-01T00:00:00Z' - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - 7dc5ca17-d311-44cd-9ce0-333080367a18 - - 6aa0700c-48e1-4c4a-8162-02e6a582df05 - - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 - x-merge-expands-to: TrackingCategory - accounting_period: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/AccountingPeriod' - nullable: true - description: The accounting period that the Invoice was generated in. - example: 7dc5ca17-d311-44cd-9ce0-333080367a18 - x-merge-expands-to: AccountingPeriod - purchase_orders: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PurchaseOrder' - nullable: true - example: - - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 - - dd70ca2f-b120-46fa-889a-9604037f45fd - - 889b281d-739c-4759-95b8-0aedb3947131 - x-merge-expands-to: PurchaseOrder - payments: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Payment' - nullable: true - example: - - b26fd49a-cbae-470a-a8f8-bcbc119e0390 - description: Array of `Payment` object IDs. - x-merge-expands-to: Payment - applied_payments: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PaymentLineItem' - nullable: true - example: - - 9017594e-dc33-4113-a5d2-b0f928e34fdd - description: A list of the Payment Applied to Lines common models related - to a given Invoice, Credit Note, or Journal Entry. - x-merge-expands-to: PaymentLineItemWithPayment - line_items: - type: array - items: - $ref: '#/components/schemas/InvoiceLineItem' - readOnly: true - example: - - remote_id: '8765432' - description: Pickleball lessons - unit_price: 50 - quantity: 1 - total_amount: 50 - currency: USD - exchange_rate: '2.9' - employee: 7442f0d5-722d-45bd-b807-6e38489d37fe - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - item: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - account: cd0f32d4-a493-11ec-b909-0242ac120002 - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - contact: 908934-49j9-093f-0989-908923908 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_data: - - path: /actions - data: - - Varies by platform - x-merge-expands-to: InvoiceLineItem - applied_credit_notes: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CreditNoteApplyLineForInvoice' - readOnly: true - example: - - credit_note: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - description: '`CreditNoteApplyLines` applied to the Invoice.' - x-merge-expands-to: CreditNoteApplyLineForInvoice - applied_vendor_credits: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/VendorCreditApplyLineForInvoice' - readOnly: true - example: - - vendor_credit: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - description: '`VendorCreditApplyLines` applied to the Invoice.' - x-merge-expands-to: VendorCreditApplyLineForInvoice - inclusive_of_tax: - type: boolean - nullable: true - description: If the transaction is inclusive or exclusive of tax. `True` - if inclusive, `False` if exclusive. - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-expands: '{"accounting_period": "AccountingPeriod", "applied_credit_notes": - "CreditNoteApplyLineForInvoice", "applied_payments": "PaymentLineItemWithPayment", - "applied_vendor_credits": "VendorCreditApplyLineForInvoice", "company": "CompanyInfo", - "contact": "Contact", "employee": "Employee", "line_items": "InvoiceLineItem", - "payment_term": "PaymentTerm", "payments": "Payment", "purchase_orders": "PurchaseOrder", - "tracking_categories": "TrackingCategory"}' - x-merge-category: accounting - InvoiceEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/InvoiceRequest' - required: - - model - x-merge-category: accounting - InvoiceLineItem: - type: object - description: |- - # The InvoiceLineItem Object - ### Description - The `InvoiceLineItem` object represents an itemized record of goods and/or services sold to a customer. - - ### Usage Example - Fetch from the `GET Invoice` endpoint and view the invoice's line items. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '8765432' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - description: - type: string - nullable: true - description: The line item's description. - example: Pickleball lessons - unit_price: - type: number - format: double - nullable: true - description: The line item's unit price. - example: 50 - quantity: - type: number - format: double - nullable: true - description: The line item's quantity. - example: 1 - total_amount: - type: number - format: double - nullable: true - description: The line item's total amount. - example: 50 - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee this overall transaction relates to. - example: 7442f0d5-722d-45bd-b807-6e38489d37fe - project: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Project' - nullable: true - example: 22e65a5d-2df5-4e6e-884a-e538d0339000 - x-merge-expands-to: Project - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The invoice's contact. - example: 908934-49j9-093f-0989-908923908 - x-merge-expands-to: Contact - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The line item's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The line item's exchange rate. - example: '2.9' - item: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Item' - nullable: true - example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - x-merge-expands-to: Item - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - example: cd0f32d4-a493-11ec-b909-0242ac120002 - x-merge-expands-to: Account - tax_rate: - type: string - format: uuid - nullable: true - example: a12e7c20-1922-9df7-s75n-edfeewnn7384 - description: The tax rate that applies to this line item. - tracking_category: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - deprecated: true - x-merge-expands-to: TrackingCategory - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: The invoice line item's associated tracking categories. - x-merge-expands-to: TrackingCategory - company: - type: string - format: uuid - nullable: true - description: The company the invoice belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-nested-write-allowed: true - x-merge-expands: '{"account": "Account", "contact": "Contact", "item": "Item", - "project": "Project", "tracking_categories": "TrackingCategory", "tracking_category": - "TrackingCategory"}' - x-merge-category: accounting - InvoiceLineItemRequest: - type: object - description: |- - # The InvoiceLineItem Object - ### Description - The `InvoiceLineItem` object represents an itemized record of goods and/or services sold to a customer. - - ### Usage Example - Fetch from the `GET Invoice` endpoint and view the invoice's line items. - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '8765432' - description: - type: string - nullable: true - description: The line item's description. - example: Pickleball lessons - unit_price: - type: number - format: double - nullable: true - description: The line item's unit price. - example: 50 - quantity: - type: number - format: double - nullable: true - description: The line item's quantity. - example: 1 - total_amount: - type: number - format: double - nullable: true - description: The line item's total amount. - example: 50 - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee this overall transaction relates to. - example: 7442f0d5-722d-45bd-b807-6e38489d37fe - project: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Project' - nullable: true - example: 22e65a5d-2df5-4e6e-884a-e538d0339000 - x-merge-expands-to: Project - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The invoice's contact. - example: 908934-49j9-093f-0989-908923908 - x-merge-expands-to: Contact - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The line item's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The line item's exchange rate. - example: '2.9' - item: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Item' - nullable: true - example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - x-merge-expands-to: Item - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - example: cd0f32d4-a493-11ec-b909-0242ac120002 - x-merge-expands-to: Account - tax_rate: - type: string - format: uuid - nullable: true - example: a12e7c20-1922-9df7-s75n-edfeewnn7384 - description: The tax rate that applies to this line item. - tracking_category: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - deprecated: true - x-merge-expands-to: TrackingCategory - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: The invoice line item's associated tracking categories. - x-merge-expands-to: TrackingCategory - company: - type: string - format: uuid - nullable: true - description: The company the invoice belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"account": "Account", "contact": "Contact", "item": "Item", - "project": "Project", "tracking_categories": "TrackingCategory", "tracking_category": - "TrackingCategory"}' - x-merge-category: accounting - InvoiceRequest: - type: object - description: |- - # The Invoice Object - ### Description - The `Invoice` object represents an itemized record of goods and/or services sold to a customer or bought from a vendor. - - - Represents a Bill when the `Invoice` type is `ACCOUNTS_PAYABLE`. References an Invoice when the `Invoice` type is `ACCOUNTS_RECEIVABLE`. - - ### Usage Example - Fetch from the `LIST Invoices` endpoint and view a company's invoices. - properties: - type: - oneOf: - - $ref: '#/components/schemas/InvoiceTypeEnum' - - type: string - nullable: true - description: |- - Whether the invoice is an accounts receivable or accounts payable. If `type` is `ACCOUNTS_PAYABLE`, the invoice is a bill. If `type` is `ACCOUNTS_RECEIVABLE`, it is an invoice. - - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The invoice's contact. - x-merge-expands-to: Contact - number: - type: string - nullable: true - description: The invoice's number. - issue_date: - type: string - format: date-time - nullable: true - description: The invoice's issue date. - due_date: - type: string - format: date-time - nullable: true - description: The invoice's due date. - paid_on_date: - type: string - format: date-time - nullable: true - description: The invoice's paid date. - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee this overall transaction relates to. - x-merge-expands-to: Employee - memo: - type: string - nullable: true - description: The invoice's private note. - status: - oneOf: - - $ref: '#/components/schemas/InvoiceStatusEnum' - - type: string - nullable: true - description: |- - The status of the invoice. - - * `PAID` - PAID - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `PARTIALLY_PAID` - PARTIALLY_PAID - * `OPEN` - OPEN - * `VOID` - VOID - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the invoice belongs to. - x-merge-expands-to: CompanyInfo - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The invoice's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The invoice's exchange rate. - total_discount: - type: number - format: double - nullable: true - description: The total discounts applied to the total cost. - sub_total: - type: number - format: double - nullable: true - description: The total amount being paid before taxes. - payment_term: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PaymentTerm' - nullable: true - description: The payment term that applies to this transaction. - x-merge-expands-to: PaymentTerm - total_tax_amount: - type: number - format: double - nullable: true - description: The total amount being paid in taxes. - inclusive_of_tax: - type: boolean - nullable: true - description: If the transaction is inclusive or exclusive of tax. `True` - if inclusive, `False` if exclusive. - total_amount: - type: number - format: double - nullable: true - description: The invoice's total amount. - balance: - type: number - format: double - nullable: true - description: The invoice's remaining balance. - payments: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Payment' - nullable: true - description: Array of `Payment` object IDs. - x-merge-expands-to: Payment - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - x-merge-expands-to: TrackingCategory - line_items: - type: array - items: - $ref: '#/components/schemas/InvoiceLineItemRequest' - x-merge-expands-to: InvoiceLineItem - purchase_orders: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PurchaseOrder' - nullable: true - x-merge-expands-to: PurchaseOrder - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"accounting_period": "AccountingPeriod", "applied_credit_notes": - "CreditNoteApplyLineForInvoice", "applied_payments": "PaymentLineItemWithPayment", - "applied_vendor_credits": "VendorCreditApplyLineForInvoice", "company": "CompanyInfo", - "contact": "Contact", "employee": "Employee", "line_items": "InvoiceLineItem", - "payment_term": "PaymentTerm", "payments": "Payment", "purchase_orders": "PurchaseOrder", - "tracking_categories": "TrackingCategory"}' - x-merge-category: accounting - InvoiceResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Invoice' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: accounting - InvoiceStatusEnum: - enum: - - PAID - - DRAFT - - SUBMITTED - - PARTIALLY_PAID - - OPEN - - VOID - type: string - description: |- - * `PAID` - PAID - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `PARTIALLY_PAID` - PARTIALLY_PAID - * `OPEN` - OPEN - * `VOID` - VOID - x-merge-category: accounting - InvoiceTypeEnum: - enum: - - ACCOUNTS_RECEIVABLE - - ACCOUNTS_PAYABLE - type: string - description: |- - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - x-merge-category: accounting - Issue: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: - oneOf: - - $ref: '#/components/schemas/IssueStatusEnum' - - type: string - description: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - example: ONGOING - error_description: - type: string - example: Missing Permissions - end_user: - type: object - additionalProperties: {} - readOnly: true - example: b82302de-852e-4e60-b050-edf9da3b7c02 - first_incident_time: - type: string - format: date-time - nullable: true - example: '2022-12-05T16:19:15.161Z' - last_incident_time: - type: string - format: date-time - nullable: true - example: '2022-12-05T16:19:15.161Z' - is_muted: - type: boolean - readOnly: true - example: true - error_details: - type: array - items: - type: string - readOnly: true - example: - - Missing employee permissions. - - Missing time off permissions. - required: - - error_description - x-merge-category: accounting - IssueStatusEnum: - enum: - - ONGOING - - RESOLVED - type: string - description: |- - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - x-merge-category: accounting - Item: - type: object - description: |- - # The Item Object - ### Description - The `Item` object refers to the goods involved in a transaction. - - ### Usage Example - Fetch from the `LIST Items` endpoint and view a company's items. - properties: - id: - type: string - format: uuid - readOnly: true - example: d2f972d0-2526-434b-9409-4c3b468e08f0 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '12374' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The item's name. - example: Pickleball Paddle - status: - oneOf: - - $ref: '#/components/schemas/Status7d1Enum' - - type: string - nullable: true - description: |- - The item's status. - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - example: ACTIVE - type: - oneOf: - - $ref: '#/components/schemas/Type2bbEnum' - - type: string - nullable: true - description: |- - The item's type. - - * `INVENTORY` - INVENTORY - * `NON_INVENTORY` - NON_INVENTORY - * `SERVICE` - SERVICE - * `UNKNOWN` - UNKNOWN - example: INVENTORY - unit_price: - type: number - format: double - nullable: true - description: The item's unit price. - example: 10 - purchase_price: - type: number - format: double - nullable: true - description: The price at which the item is purchased from a vendor. - example: 25 - purchase_account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: References the default account used to record a purchase of - the item. - example: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - x-merge-expands-to: Account - sales_account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: References the default account used to record a sale. - example: 3872b4c9-f5d2-4f3b-a66b-dfedbed42c49 - x-merge-expands-to: Account - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the item belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - purchase_tax_rate: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TaxRate' - nullable: true - description: The default purchase tax rate for this item. - example: 983e8f97-9qw2-34v9-p123-67bdf98740v5 - x-merge-expands-to: TaxRate - sales_tax_rate: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TaxRate' - nullable: true - description: The default sales tax rate for this item. - example: 232c8f56-7se4-98f2-y334-12bdf89249f5 - x-merge-expands-to: TaxRate - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's item note was updated. - example: '2020-03-31T00:00:00Z' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - x-merge-expands: '{"company": "CompanyInfo", "purchase_account": "Account", - "purchase_tax_rate": "TaxRate", "sales_account": "Account", "sales_tax_rate": - "TaxRate"}' - x-merge-category: accounting - ItemEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/ItemRequestRequest' - required: - - model - x-merge-category: accounting - ItemFormatEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - type: string - description: |- - * `string` - uuid - * `number` - url - * `date` - email - * `datetime` - phone - * `bool` - currency - * `list` - decimal - x-merge-category: accounting - ItemRequestRequest: - type: object - description: |- - # The Item Object - ### Description - The `Item` object refers to the goods involved in a transaction. - - ### Usage Example - Fetch from the `LIST Items` endpoint and view a company's items. - properties: - name: - type: string - nullable: true - description: The item's name. - example: Pickleball Paddle - status: - oneOf: - - $ref: '#/components/schemas/Status7d1Enum' - - type: string - nullable: true - description: |- - The item's status. - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - example: ACTIVE - type: - oneOf: - - $ref: '#/components/schemas/Type2bbEnum' - - type: string - nullable: true - description: |- - The item's type. - - * `INVENTORY` - INVENTORY - * `NON_INVENTORY` - NON_INVENTORY - * `SERVICE` - SERVICE - * `UNKNOWN` - UNKNOWN - example: INVENTORY - unit_price: - type: number - format: double - nullable: true - description: The item's unit price. - example: 10 - purchase_price: - type: number - format: double - nullable: true - description: The price at which the item is purchased from a vendor. - example: 25 - purchase_account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: References the default account used to record a purchase of - the item. - example: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - x-merge-expands-to: Account - sales_account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: References the default account used to record a sale. - example: 3872b4c9-f5d2-4f3b-a66b-dfedbed42c49 - x-merge-expands-to: Account - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the item belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - purchase_tax_rate: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TaxRate' - nullable: true - description: The default purchase tax rate for this item. - example: 983e8f97-9qw2-34v9-p123-67bdf98740v5 - x-merge-expands-to: TaxRate - sales_tax_rate: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TaxRate' - nullable: true - description: The default sales tax rate for this item. - example: 232c8f56-7se4-98f2-y334-12bdf89249f5 - x-merge-expands-to: TaxRate - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"company": "CompanyInfo", "purchase_account": "Account", - "purchase_tax_rate": "TaxRate", "sales_account": "Account", "sales_tax_rate": - "TaxRate"}' - x-merge-category: accounting - ItemResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Item' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: accounting - ItemSchema: - type: object - properties: - item_type: - $ref: '#/components/schemas/ItemTypeEnum' - item_format: - $ref: '#/components/schemas/ItemFormatEnum' - item_choices: - type: array - items: - type: string - x-merge-category: accounting - ItemTypeEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - type: string - description: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - x-merge-category: accounting - JournalEntry: - type: object - description: |- - # The JournalEntry Object - ### Description - A `JournalEntry` is a record of a transaction or event that is entered into a company's accounting system. - - The `JournalEntry` common model contains records that are automatically created as a result of a certain type of transaction, like an Invoice, and records that are manually created against a company’s ledger. - - The lines of a given `JournalEntry` object should always sum to 0. A positive `net_amount` means the line represents a debit and a negative net_amount represents a credit. - - ### Usage Example - Fetch from the `GET JournalEntry` endpoint and view a company's journey entry. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '088899' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - transaction_date: - type: string - format: date-time - nullable: true - description: The journal entry's transaction date. - example: '2020-03-31T00:00:00Z' - payments: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Payment' - nullable: true - example: - - b26fd49a-cbae-470a-a8f8-bcbc119e0390 - description: Array of `Payment` object IDs. - x-merge-expands-to: Payment - applied_payments: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PaymentLineItem' - nullable: true - example: - - 4311155d-f236-4a5d-9e0f-1cb167e38f95 - description: A list of the Payment Applied to Lines common models related - to a given Invoice, Credit Note, or Journal Entry. - x-merge-expands-to: PaymentLineItemWithPayment - memo: - type: string - nullable: true - description: The journal entry's private note. - example: Weekly Payment - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The journal's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The journal entry's exchange rate. - example: '2.9' - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the journal entry belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - inclusive_of_tax: - type: boolean - nullable: true - description: If the transaction is inclusive or exclusive of tax. `True` - if inclusive, `False` if exclusive. - lines: - type: array - items: - $ref: '#/components/schemas/JournalLine' - readOnly: true - example: - - remote_id: '121222' - account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - net_amount: 25.54 - tracking_categories: - - d25d609b-945f-4762-b55a-1c8fb220c43c - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - contact: d2d5ea3c-b032-11ec-b909-0242ac120002 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - employee: 123c8r35-5kf5-12x5-r833-99bwf35210b5 - description: Cash payment for lunch - exchange_rate: '2.9' - remote_was_deleted: false - - remote_id: '121223' - account: f963f34d-3d2f-4f77-b557-cf36bc7e6498 - net_amount: 10 - x-merge-expands-to: JournalLine - journal_number: - type: string - nullable: true - description: Reference number for identifying journal entries. - maxLength: 70 - example: '42' - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - x-merge-expands-to: TrackingCategory - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - posting_status: - oneOf: - - $ref: '#/components/schemas/PostingStatusEnum' - - type: string - nullable: true - description: |- - The journal's posting status. - - * `UNPOSTED` - UNPOSTED - * `POSTED` - POSTED - example: POSTED - accounting_period: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/AccountingPeriod' - nullable: true - description: The accounting period that the JournalEntry was generated in. - example: 655c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: AccountingPeriod - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's journal entry was created. - example: '2020-03-31T00:00:00Z' - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's journal entry was updated. - example: '2020-03-31T00:00:00Z' - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-expands: '{"accounting_period": "AccountingPeriod", "applied_payments": - "PaymentLineItemWithPayment", "company": "CompanyInfo", "lines": "JournalLine", - "payments": "Payment", "tracking_categories": "TrackingCategory"}' - x-merge-category: accounting - JournalEntryEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/JournalEntryRequest' - required: - - model - x-merge-category: accounting - JournalEntryRequest: - type: object - description: |- - # The JournalEntry Object - ### Description - The `JournalEntry` object is used to get a record of all manually created entries made in a company’s general ledger. The journal line items for each journal entry should sum to zero. - - ### Usage Example - Fetch from the `GET JournalEntry` endpoint and view a company's journey entry. - properties: - transaction_date: - type: string - format: date-time - nullable: true - description: The journal entry's transaction date. - payments: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Payment' - nullable: true - description: Array of `Payment` object IDs. - x-merge-expands-to: Payment - memo: - type: string - nullable: true - description: The journal entry's private note. - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The journal's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The journal entry's exchange rate. - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the journal entry belongs to. - x-merge-expands-to: CompanyInfo - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - x-merge-expands-to: TrackingCategory - inclusive_of_tax: - type: boolean - nullable: true - description: If the transaction is inclusive or exclusive of tax. `True` - if inclusive, `False` if exclusive. - lines: - type: array - items: - $ref: '#/components/schemas/JournalLineRequest' - x-merge-expands-to: JournalLine - journal_number: - type: string - nullable: true - description: Reference number for identifying journal entries. - maxLength: 70 - posting_status: - oneOf: - - $ref: '#/components/schemas/PostingStatusEnum' - - type: string - nullable: true - description: |- - The journal's posting status. - - * `UNPOSTED` - UNPOSTED - * `POSTED` - POSTED - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"accounting_period": "AccountingPeriod", "applied_payments": - "PaymentLineItemWithPayment", "company": "CompanyInfo", "lines": "JournalLine", - "payments": "Payment", "tracking_categories": "TrackingCategory"}' - x-merge-category: accounting - JournalEntryResponse: - type: object - properties: - model: - $ref: '#/components/schemas/JournalEntry' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: accounting - JournalLine: - type: object - description: |- - # The JournalLine Object - ### Description - The `JournalLine` object is used to represent a journal entry's line items. - - ### Usage Example - Fetch from the `GET JournalEntry` endpoint and view the journal entry's line items. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '121222' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - example: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - x-merge-expands-to: Account - net_amount: - type: number - format: double - nullable: true - description: The value of the line item including taxes and other fees. - example: 25.54 - tracking_category: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - deprecated: true - x-merge-expands-to: TrackingCategory - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - d25d609b-945f-4762-b55a-1c8fb220c43c - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: The journal line item's associated tracking categories. - x-merge-expands-to: TrackingCategory - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The journal line item's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - company: - type: string - format: uuid - nullable: true - description: The company the journal entry belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - employee: - type: string - format: uuid - nullable: true - example: 123c8r35-5kf5-12x5-r833-99bwf35210b5 - project: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Project' - nullable: true - example: 22e65a5d-2df5-4e6e-884a-e538d0339000 - x-merge-expands-to: Project - contact: - type: string - format: uuid - nullable: true - example: d2d5ea3c-b032-11ec-b909-0242ac120002 - tax_rate: - type: string - format: uuid - nullable: true - example: a12e7c20-1922-9df7-s75n-edfeewnn7384 - description: The tax rate that applies to this line item. - description: - type: string - nullable: true - description: The line's description. - example: Cash payment for lunch - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The journal line item's exchange rate. - example: '2.9' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-nested-write-allowed: true - x-merge-expands: '{"account": "Account", "project": "Project", "tracking_categories": - "TrackingCategory", "tracking_category": "TrackingCategory"}' - x-merge-category: accounting - JournalLineRequest: - type: object - description: |- - # The JournalLine Object - ### Description - The `JournalLine` object is used to represent a journal entry's line items. - - ### Usage Example - Fetch from the `GET JournalEntry` endpoint and view the journal entry's line items. - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '121222' - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - example: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - x-merge-expands-to: Account - net_amount: - type: number - format: double - nullable: true - description: The value of the line item including taxes and other fees. - example: 25.54 - tracking_category: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - deprecated: true - x-merge-expands-to: TrackingCategory - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - d25d609b-945f-4762-b55a-1c8fb220c43c - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: The journal line item's associated tracking categories. - x-merge-expands-to: TrackingCategory - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The journal line item's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - company: - type: string - format: uuid - nullable: true - description: The company the journal entry belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - employee: - type: string - format: uuid - nullable: true - example: 123c8r35-5kf5-12x5-r833-99bwf35210b5 - project: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Project' - nullable: true - example: 22e65a5d-2df5-4e6e-884a-e538d0339000 - x-merge-expands-to: Project - contact: - type: string - format: uuid - nullable: true - example: d2d5ea3c-b032-11ec-b909-0242ac120002 - tax_rate: - type: string - format: uuid - nullable: true - example: a12e7c20-1922-9df7-s75n-edfeewnn7384 - description: The tax rate that applies to this line item. - description: - type: string - nullable: true - description: The line's description. - example: Cash payment for lunch - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The journal line item's exchange rate. - example: '2.9' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"account": "Account", "project": "Project", "tracking_categories": - "TrackingCategory", "tracking_category": "TrackingCategory"}' - x-merge-category: accounting - LanguageEnum: - enum: - - en - - de - type: string - description: |- - * `en` - en - * `de` - de - x-merge-category: accounting - LastSyncResultEnum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - type: string - description: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - x-merge-category: accounting - LinkToken: - type: object - properties: - link_token: - type: string - example: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 - integration_name: - type: string - example: Lever - magic_link_url: - type: string - example: https://link.merge.dev/asdfjkl12345jsndfgi2i83n - required: - - link_token - x-merge-category: accounting - LinkedAccountCommonModelScopeDeserializerRequest: - type: object - properties: - common_models: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' - description: The common models you want to update the scopes for - example: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - home_location - disabled_fields: - - work_location - - model_name: Benefit - model_permissions: - WRITE: - is_enabled: false - required: - - common_models - x-merge-category: accounting - LinkedAccountStatus: - type: object - properties: - linked_account_status: - type: string - can_make_request: - type: boolean - required: - - can_make_request - - linked_account_status - x-merge-category: accounting - MetaResponse: - type: object - properties: - request_schema: - type: object - additionalProperties: {} - example: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - type: object - additionalProperties: {} - status: - $ref: '#/components/schemas/LinkedAccountStatus' - example: - linked_account_status: COMPLETE - can_make_request: true - has_conditional_params: - type: boolean - has_required_linked_account_params: - type: boolean - required: - - has_conditional_params - - has_required_linked_account_params - - request_schema - x-merge-category: accounting - MethodEnum: - enum: - - GET - - OPTIONS - - HEAD - - POST - - PUT - - PATCH - - DELETE - type: string - description: |- - * `GET` - GET - * `OPTIONS` - OPTIONS - * `HEAD` - HEAD - * `POST` - POST - * `PUT` - PUT - * `PATCH` - PATCH - * `DELETE` - DELETE - x-merge-category: accounting - MethodTypeEnum: - enum: - - CREDIT_CARD - - DEBIT_CARD - - ACH - - CASH - - CHECK - type: string - description: |- - * `CREDIT_CARD` - CREDIT_CARD - * `DEBIT_CARD` - DEBIT_CARD - * `ACH` - ACH - * `CASH` - CASH - * `CHECK` - CHECK - x-merge-category: accounting - ModelOperation: - type: object - description: |- - # The ModelOperation Object - ### Description - The `ModelOperation` object is used to represent the operations that are currently supported for a given model. - - ### Usage Example - View what operations are supported for the `Candidate` endpoint. - properties: - model_name: - type: string - example: Candidate - available_operations: - type: array - items: - type: string - example: - - FETCH - - CREATE - required_post_parameters: - type: array - items: - type: string - example: - - remote_user_id - supported_fields: - type: array - items: - type: string - example: - - first_name - - last_name - - company - - title - required: - - available_operations - - model_name - - required_post_parameters - - supported_fields - x-merge-category: accounting - ModelPermissionDeserializer: - type: object - properties: - is_enabled: - type: boolean - x-merge-category: accounting - ModelPermissionDeserializerRequest: - type: object - properties: - is_enabled: - type: boolean - x-merge-category: accounting - MultipartFormFieldRequest: - type: object - description: |- - # The MultipartFormField Object - ### Description - The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. - - ### Usage Example - Create a `MultipartFormField` to define a multipart form entry. - properties: - name: - type: string - minLength: 1 - description: The name of the form field - example: resume - data: - type: string - minLength: 1 - description: The data for the form field. - example: SW50ZWdyYXRlIGZhc3QKSW50ZWdyYXRlIG9uY2U= - encoding: - oneOf: - - $ref: '#/components/schemas/EncodingEnum' - nullable: true - default: RAW - description: |- - The encoding of the value of `data`. Defaults to `RAW` if not defined. - - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - example: BASE64 - file_name: - type: string - nullable: true - minLength: 1 - description: The file name of the form field, if the field is for a file. - example: resume.pdf - content_type: - type: string - nullable: true - minLength: 1 - description: The MIME type of the file, if the field is for a file. - example: application/pdf - required: - - data - - name - x-merge-category: accounting - PaginatedAccountDetailsAndActionsList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/AccountDetailsAndActions' - x-merge-category: accounting - PaginatedAccountList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Account' - x-merge-category: accounting - PaginatedAccountingAttachmentList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/AccountingAttachment' - x-merge-category: accounting - PaginatedAccountingPeriodList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/AccountingPeriod' - x-merge-category: accounting - PaginatedAuditLogEventList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/AuditLogEvent' - x-merge-category: accounting - PaginatedBalanceSheetList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/BalanceSheet' - x-merge-category: accounting - PaginatedBankFeedAccountList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/BankFeedAccount' - x-merge-category: accounting - PaginatedBankFeedTransactionList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/BankFeedTransaction' - x-merge-category: accounting - PaginatedCashFlowStatementList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/CashFlowStatement' - x-merge-category: accounting - PaginatedCompanyInfoList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/CompanyInfo' - x-merge-category: accounting - PaginatedContactList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Contact' - x-merge-category: accounting - PaginatedCreditNoteList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/CreditNote' - x-merge-category: accounting - PaginatedEmployeeList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Employee' - x-merge-category: accounting - PaginatedExpenseList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Expense' - x-merge-category: accounting - PaginatedGeneralLedgerTransactionList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/GeneralLedgerTransaction' - x-merge-category: accounting - PaginatedIncomeStatementList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/IncomeStatement' - x-merge-category: accounting - PaginatedInvoiceList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Invoice' - x-merge-category: accounting - PaginatedIssueList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Issue' - x-merge-category: accounting - PaginatedItemList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Item' - x-merge-category: accounting - PaginatedJournalEntryList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/JournalEntry' - x-merge-category: accounting - PaginatedPaymentList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Payment' - x-merge-category: accounting - PaginatedPaymentMethodList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/PaymentMethod' - x-merge-category: accounting - PaginatedPaymentTermList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/PaymentTerm' - x-merge-category: accounting - PaginatedProjectList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Project' - x-merge-category: accounting - PaginatedPurchaseOrderList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/PurchaseOrder' - x-merge-category: accounting - PaginatedRemoteFieldClassList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/RemoteFieldClass' - x-merge-category: accounting - PaginatedSyncStatusList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/SyncStatus' - x-merge-category: accounting - PaginatedTaxRateList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/TaxRate' - x-merge-category: accounting - PaginatedTrackingCategoryList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/TrackingCategory' - x-merge-category: accounting - PaginatedTransactionList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Transaction' - x-merge-category: accounting - PaginatedVendorCreditList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/VendorCredit' - x-merge-category: accounting - PatchedEditFieldMappingRequest: - type: object - properties: - remote_field_traversal_path: - type: array - items: {} - description: The field traversal path of the remote field listed when you - hit the GET /remote-fields endpoint. - example: - - example_remote_field_name - remote_method: - type: string - minLength: 1 - description: The method of the remote endpoint where the remote field is - coming from. - example: GET - remote_url_path: - type: string - minLength: 1 - description: The path of the remote endpoint where the remote field is coming - from. - example: /example-url-path - x-merge-category: accounting - PatchedInvoiceEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/InvoiceRequest' - required: - - model - x-merge-category: accounting - PatchedItemEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/PatchedItemRequestRequest' - required: - - model - x-merge-category: accounting - PatchedItemRequestRequest: - type: object - description: |- - # The Item Object - ### Description - The `Item` object refers to the goods involved in a transaction. - - ### Usage Example - Fetch from the `LIST Items` endpoint and view a company's items. - properties: - name: - type: string - nullable: true - description: The item's name. - example: Pickleball Paddle - status: - oneOf: - - $ref: '#/components/schemas/Status7d1Enum' - - type: string - nullable: true - description: |- - The item's status. - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - example: ACTIVE - type: - oneOf: - - $ref: '#/components/schemas/Type2bbEnum' - - type: string - nullable: true - description: |- - The item's type. - - * `INVENTORY` - INVENTORY - * `NON_INVENTORY` - NON_INVENTORY - * `SERVICE` - SERVICE - * `UNKNOWN` - UNKNOWN - example: INVENTORY - unit_price: - type: number - format: double - nullable: true - description: The item's unit price. - example: 10 - purchase_price: - type: number - format: double - nullable: true - description: The price at which the item is purchased from a vendor. - example: 25 - purchase_account: - type: string - format: uuid - nullable: true - description: References the default account used to record a purchase of - the item. - example: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - sales_account: - type: string - format: uuid - nullable: true - description: References the default account used to record a sale. - example: 3872b4c9-f5d2-4f3b-a66b-dfedbed42c49 - company: - type: string - format: uuid - nullable: true - description: The company the item belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - purchase_tax_rate: - type: string - format: uuid - nullable: true - description: The default purchase tax rate for this item. - example: 983e8f97-9qw2-34v9-p123-67bdf98740v5 - sales_tax_rate: - type: string - format: uuid - nullable: true - description: The default sales tax rate for this item. - example: 232c8f56-7se4-98f2-y334-12bdf89249f5 - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-category: accounting - PatchedPaymentEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/PatchedPaymentRequest' - required: - - model - x-merge-category: accounting - PatchedPaymentRequest: - type: object - description: |- - # The Payment Object - ### Description - The `Payment` object represents general payments made towards a specific transaction. - - ### Usage Example - Fetch from the `GET Payment` endpoint and view an invoice's payment. - properties: - transaction_date: - type: string - format: date-time - nullable: true - description: The payment's transaction date. - example: '2020-03-31T00:00:00Z' - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The supplier, or customer involved in the payment. - example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The supplier’s or customer’s account in which the payment is - made. - example: d6e687d6-0c36-48a1-8114-35324b5cb38f - payment_method: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PaymentMethod' - nullable: true - description: The method which this payment was made by. - example: 9394320-8864-2343-4343-9008789 - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The payment's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: FKP - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The payment's exchange rate. - example: '2.9' - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the payment belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - total_amount: - type: number - format: double - nullable: true - description: The total amount of money being paid to the supplier, or customer, - after taxes. - example: 50 - type: - oneOf: - - $ref: '#/components/schemas/PaymentTypeEnum' - - type: string - nullable: true - description: |- - The type of the invoice. - - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - example: ACCOUNTS_PAYABLE - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - accounting_period: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/AccountingPeriod' - nullable: true - description: The accounting period that the Payment was generated in. - example: b38c59b0-a9d7-4740-b1ee-5436c6751e3d - applied_to_lines: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PaymentLineItemRequest' - description: A list of “Payment Applied to Lines” objects. - example: - - remote_id: '234' - applied_amount: '25' - related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa - related_object_type: INVOICE - applied_date: '2020-03-31T00:00:00Z' - - remote_id: '235' - applied_amount: '25' - related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 - related_object_type: CREDIT_NOTE - applied_date: '2020-03-31T00:00:00Z' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-category: accounting - Payment: - type: object - description: |- - # The Payment Object - ### Description - The `Payment` object represents general payments made towards a specific transaction. - - ### Usage Example - Fetch from the `GET Payment` endpoint and view an invoice's payment. - properties: - id: - type: string - format: uuid - readOnly: true - example: b26fd49a-cbae-470a-a8f8-bcbc119e0390 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '987300' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - transaction_date: - type: string - format: date-time - nullable: true - description: The payment's transaction date. - example: '2020-03-31T00:00:00Z' - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The supplier, or customer involved in the payment. - example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - x-merge-expands-to: Contact - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The supplier’s or customer’s account in which the payment is - made. - example: d6e687d6-0c36-48a1-8114-35324b5cb38f - x-merge-expands-to: Account - payment_method: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PaymentMethod' - nullable: true - description: The method which this payment was made by. - example: 9394320-8864-2343-4343-9008789 - x-merge-expands-to: PaymentMethod - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The payment's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: FKP - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The payment's exchange rate. - example: '2.9' - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the payment belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - total_amount: - type: number - format: double - nullable: true - description: The total amount of money being paid to the supplier, or customer, - after taxes. - example: 50 - type: - oneOf: - - $ref: '#/components/schemas/PaymentTypeEnum' - - type: string - nullable: true - description: |- - The type of the invoice. - - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - example: ACCOUNTS_PAYABLE - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - x-merge-expands-to: TrackingCategory - accounting_period: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/AccountingPeriod' - nullable: true - description: The accounting period that the Payment was generated in. - example: b38c59b0-a9d7-4740-b1ee-5436c6751e3d - x-merge-expands-to: AccountingPeriod - applied_to_lines: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PaymentLineItem' - description: A list of “Payment Applied to Lines” objects. - example: - - remote_id: '234' - applied_amount: '25' - related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa - related_object_type: INVOICE - applied_date: '2020-03-31T00:00:00Z' - - remote_id: '235' - applied_amount: '25' - related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 - related_object_type: CREDIT_NOTE - applied_date: '2020-03-31T00:00:00Z' - x-merge-expands-to: PaymentLineItem - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's payment entry was updated. - example: '2020-03-31T00:00:00Z' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-expands: '{"account": "Account", "accounting_period": "AccountingPeriod", - "applied_to_lines": "PaymentLineItem", "company": "CompanyInfo", "contact": - "Contact", "payment_method": "PaymentMethod", "tracking_categories": "TrackingCategory"}' - x-merge-category: accounting - PaymentEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/PaymentRequest' - required: - - model - x-merge-category: accounting - PaymentLineItem: - type: object - description: |- - # The PaymentLineItem Object - ### Description - The `PaymentLineItem` object is an applied-to-line on a `Payment` that can either be a `Invoice`, `CreditNote`, or `JournalEntry`. - - ### Usage Example - `Payment` will have a field called `applied-to-lines` which will be an array of `PaymentLineItemInternalMappingSerializer` objects that can either be a `Invoice`, `CreditNote`, or `JournalEntry`. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '234' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - applied_amount: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The amount being applied to the transaction. - example: '25' - applied_date: - type: string - format: date-time - nullable: true - description: The date the payment portion is applied. - example: '2020-03-31T00:00:00Z' - related_object_id: - type: string - format: uuid - description: The Merge ID of the transaction the payment portion is being - applied to. - example: 92e8a369-fffe-430d-b93a-f7e8a16563f1 - related_object_type: - type: string - description: 'The type of transaction the payment portion is being applied - to. Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE.' - example: INVOICE - x-merge-nested-write-allowed: true - x-merge-category: accounting - PaymentLineItemRequest: - type: object - description: |- - # The PaymentLineItem Object - ### Description - The `PaymentLineItem` object is an applied-to-line on a `Payment` that can either be a `Invoice`, `CreditNote`, or `JournalEntry`. - - ### Usage Example - `Payment` will have a field called `applied-to-lines` which will be an array of `PaymentLineItemInternalMappingSerializer` objects that can either be a `Invoice`, `CreditNote`, or `JournalEntry`. - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '234' - applied_amount: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The amount being applied to the transaction. - example: '25' - applied_date: - type: string - format: date-time - nullable: true - description: The date the payment portion is applied. - example: '2020-03-31T00:00:00Z' - related_object_id: - type: string - format: uuid - description: The Merge ID of the transaction the payment portion is being - applied to. - example: 92e8a369-fffe-430d-b93a-f7e8a16563f1 - related_object_type: - type: string - minLength: 1 - description: 'The type of transaction the payment portion is being applied - to. Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE.' - example: INVOICE - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-category: accounting - PaymentMethod: - type: object - description: |- - # The PaymentMethod Object - ### Description - The `PaymentMethod` object defines how a payment against an invoice is made. - - ### Usage Example - Fetch from the `GET PaymentMethod` endpoint and view payment method information. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '088899' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - method_type: - oneOf: - - $ref: '#/components/schemas/MethodTypeEnum' - - type: string - description: |- - The type of the payment method. - - * `CREDIT_CARD` - CREDIT_CARD - * `DEBIT_CARD` - DEBIT_CARD - * `ACH` - ACH - * `CASH` - CASH - * `CHECK` - CHECK - example: CREDIT_CARD - name: - type: string - description: The payment method’s name - maxLength: 255 - example: John Smith's Credit Card - is_active: - type: boolean - description: '`True` if the payment method is active, `False` if not.' - example: true - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's payment method was updated. - example: '2021-09-15T00:00:00Z' - field_mappings: - type: object - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - required: - - method_type - - name - x-merge-category: accounting - PaymentRequest: - type: object - description: |- - # The Payment Object - ### Description - The `Payment` object represents general payments made towards a specific transaction. - - ### Usage Example - Fetch from the `GET Payment` endpoint and view an invoice's payment. - properties: - transaction_date: - type: string - format: date-time - nullable: true - description: The payment's transaction date. - example: '2020-03-31T00:00:00Z' - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The supplier, or customer involved in the payment. - example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - x-merge-expands-to: Contact - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The supplier’s or customer’s account in which the payment is - made. - example: d6e687d6-0c36-48a1-8114-35324b5cb38f - x-merge-expands-to: Account - payment_method: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PaymentMethod' - nullable: true - description: The method which this payment was made by. - example: 9394320-8864-2343-4343-9008789 - x-merge-expands-to: PaymentMethod - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The payment's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: FKP - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The payment's exchange rate. - example: '2.9' - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the payment belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - total_amount: - type: number - format: double - nullable: true - description: The total amount of money being paid to the supplier, or customer, - after taxes. - example: 50 - type: - oneOf: - - $ref: '#/components/schemas/PaymentTypeEnum' - - type: string - nullable: true - description: |- - The type of the invoice. - - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - example: ACCOUNTS_PAYABLE - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - x-merge-expands-to: TrackingCategory - accounting_period: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/AccountingPeriod' - nullable: true - description: The accounting period that the Payment was generated in. - example: b38c59b0-a9d7-4740-b1ee-5436c6751e3d - x-merge-expands-to: AccountingPeriod - applied_to_lines: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PaymentLineItemRequest' - description: A list of “Payment Applied to Lines” objects. - example: - - remote_id: '234' - applied_amount: 25 - related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa - related_object_type: INVOICE - applied_date: '2020-03-31T00:00:00Z' - - remote_id: '235' - applied_amount: 25 - related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 - related_object_type: CREDIT_NOTE - applied_date: '2020-03-31T00:00:00Z' - x-merge-expands-to: PaymentLineItem - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"account": "Account", "accounting_period": "AccountingPeriod", - "applied_to_lines": "PaymentLineItem", "company": "CompanyInfo", "contact": - "Contact", "payment_method": "PaymentMethod", "tracking_categories": "TrackingCategory"}' - x-merge-category: accounting - PaymentResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Payment' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: accounting - PaymentTerm: - type: object - description: |- - # The PaymentTerm Object - ### Description - The `PaymentTerm` object is the agreed-upon conditions between a buyer and a seller that define the timing, - amount, and conditions under which payment for goods or services must be made. - - ### Usage Example - Fetch from the `GET PaymentTerm` endpoint and view payment term information. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '088899' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - description: The name of the payment term. - maxLength: 255 - example: Net 30 - is_active: - type: boolean - description: '`True` if the payment term is active, `False` if not.' - example: true - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The subsidiary that the payment term belongs to. - example: d2f972d0-2526-434b-9409-4c3b468e08f0 - x-merge-expands-to: CompanyInfo - days_until_due: - type: integer - maximum: 2147483647 - minimum: -2147483648 - nullable: true - description: The number of days after the invoice date that payment is due. - example: 30 - discount_days: - type: integer - maximum: 2147483647 - minimum: -2147483648 - nullable: true - description: The number of days the invoice must be paid before discounts - expire. - example: 15 - remote_last_modified_at: - type: string - format: date-time - nullable: true - description: When the third party's payment term was modified. - example: '2024-10-16T00:00:00Z' - field_mappings: - type: object - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - required: - - name - x-merge-expands: '{"company": "CompanyInfo"}' - x-merge-category: accounting - PaymentTypeEnum: - enum: - - ACCOUNTS_PAYABLE - - ACCOUNTS_RECEIVABLE - type: string - description: |- - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - x-merge-category: accounting - PostingStatusEnum: - enum: - - UNPOSTED - - POSTED - type: string - description: |- - * `UNPOSTED` - UNPOSTED - * `POSTED` - POSTED - x-merge-category: accounting - Project: - type: object - description: |- - # The Project Object - ### Description - The `Project` object is used to track and manage time, costs, resources, and revenue for specific initiatives or work efforts. - It provides classification on transactions for allocating expenses, revenue, and activities to a specific project for financial reporting. - - ### Usage Example - Fetch from the `GET Project` endpoint and view project information. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '088899' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - description: The project’s name - maxLength: 255 - example: Permissions Mapping - is_active: - type: boolean - description: '`True` if the project is active, `False` if the project is - not active.' - example: true - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The subsidiary that the project belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The supplier, or customer involved in the project. - example: d25d609b-945f-4762-b55a-1c8fb220c43c - x-merge-expands-to: Contact - field_mappings: - type: object - nullable: true - readOnly: true - additionalProperties: {} - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - required: - - name - x-merge-expands: '{"company": "CompanyInfo", "contact": "Contact"}' - x-merge-category: accounting - PurchaseOrder: - type: object - description: |- - # The PurchaseOrder Object - ### Description - A `PurchaseOrder` represents a request to purchase goods or services from a vendor. It outlines the details of the purchase, such as the items or services requested, quantities, prices, and delivery details. - - A `PurchaseOrder` is a crucial component of the procurement process, but does not typically result in any impact on the company’s general ledger. The general ledger is typically only affected when the `PurchaseOrder` is fulfilled as an *Accounts Payable* `Invoice` object (also known as a Bill). - - ### Usage Example - Fetch from the `LIST PurchaseOrders` endpoint and view a company's purchase orders. - properties: - id: - type: string - format: uuid - readOnly: true - example: 0048ea5b-911e-4dff-9364-92070dea62ff - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '239741' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - status: - oneOf: - - $ref: '#/components/schemas/PurchaseOrderStatusEnum' - - type: string - nullable: true - description: |- - The purchase order's status. - - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `AUTHORIZED` - AUTHORIZED - * `BILLED` - BILLED - * `DELETED` - DELETED - example: SUBMITTED - issue_date: - type: string - format: date-time - nullable: true - description: The purchase order's issue date. - example: '2020-03-31T00:00:00Z' - purchase_order_number: - type: string - nullable: true - description: The human-readable number of the purchase order. - maxLength: 100 - example: PO1234 - delivery_date: - type: string - format: date-time - nullable: true - description: The purchase order's delivery date. - example: '2020-04-15T00:00:00Z' - delivery_address: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Address' - nullable: true - description: The purchase order's delivery address. - example: - street_1: 2920 Broadway - street_2: 2nd Floor - city: New York - state: NY - country: US - zip_code: '10027' - x-merge-expands-to: Address - customer: - type: string - format: uuid - nullable: true - description: The contact making the purchase order. - example: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 - vendor: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The party fulfilling the purchase order. - example: 2c22ce34-5c6e-4fc7-a594-7f26bb4cf78b - x-merge-expands-to: Contact - memo: - type: string - nullable: true - description: A memo attached to the purchase order. - example: private note - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the purchase order belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - total_amount: - type: number - format: double - nullable: true - description: The purchase order's total amount. - example: 260 - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The purchase order's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The purchase order's exchange rate. - example: '2.9' - payment_term: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PaymentTerm' - nullable: true - description: The payment term that applies to this transaction. - example: 89d329de-825f-4ac6-8369-3c58b4e68bee - x-merge-expands-to: PaymentTerm - line_items: - type: array - items: - $ref: '#/components/schemas/PurchaseOrderLineItem' - readOnly: true - example: - - remote_id: '121222' - description: Pickleball paddles - unit_price: 25 - quantity: 10 - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - item: 0958cbc6-6040-430a-848e-aafacbadf4ae - tracking_categories: - - f1214c24-2702-4617-b74b-3ddecfc0d384 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - tax_amount: 10 - total_line_amount: 260 - currency: USD - exchange_rate: '2.9' - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: false - - description: Pickleball Balls - unit_price: 1 - quantity: 10 - item: 249c9faa-3045-4a31-953b-8f22d3613301 - tracking_categories: - - f1214c24-2702-4617-b74b-3ddecfc0d384 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - tax_amount: 10 - total_line_amount: 20 - x-merge-expands-to: PurchaseOrderLineItem - inclusive_of_tax: - type: boolean - nullable: true - description: If the transaction is inclusive or exclusive of tax. `True` - if inclusive, `False` if exclusive. - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - x-merge-expands-to: TrackingCategory - accounting_period: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/AccountingPeriod' - nullable: true - description: The accounting period that the PurchaseOrder was generated - in. - example: 2c22ce34-5c6e-4fc7-a594-7f26bb4cf78b - x-merge-expands-to: AccountingPeriod - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's purchase order note was created. - example: '2020-03-31T00:00:00Z' - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's purchase order note was updated. - example: '2020-03-31T00:00:00Z' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-expands: '{"accounting_period": "AccountingPeriod", "company": "CompanyInfo", - "delivery_address": "Address", "line_items": "PurchaseOrderLineItem", "payment_term": - "PaymentTerm", "tracking_categories": "TrackingCategory", "vendor": "Contact"}' - x-merge-category: accounting - PurchaseOrderEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/PurchaseOrderRequest' - required: - - model - x-merge-category: accounting - PurchaseOrderLineItem: - type: object - description: |- - # The PurchaseOrderLineItem Object - ### Description - The `PurchaseOrderLineItem` object is used to represent a purchase order's line item. - - ### Usage Example - Fetch from the `GET PurchaseOrder` endpoint and view a company's purchase orders. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '121222' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - description: - type: string - nullable: true - description: A description of the good being purchased. - example: Pickleball paddles - unit_price: - type: number - format: double - nullable: true - description: The line item's unit price. - example: 25 - quantity: - type: number - format: double - nullable: true - description: The line item's quantity. - example: 10 - item: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Item' - nullable: true - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - x-merge-expands-to: Item - account: - type: string - format: uuid - nullable: true - description: The purchase order line item's account. - tracking_category: - type: string - format: uuid - nullable: true - description: The purchase order line item's associated tracking category. - deprecated: true - tracking_categories: - type: array - items: - type: string - format: uuid - nullable: true - example: - - f1214c24-2702-4617-b74b-3ddecfc0d384 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: The purchase order line item's associated tracking categories. - tax_amount: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The purchase order line item's tax amount. - example: 10 - total_line_amount: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The purchase order line item's total amount. - example: 260 - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The purchase order line item's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - tax_rate: - type: string - format: uuid - nullable: true - example: a12e7c20-1922-9df7-s75n-edfeewnn7384 - description: The tax rate that applies to this line item. - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The purchase order line item's exchange rate. - example: '2.9' - company: - type: string - format: uuid - nullable: true - description: The company the purchase order line item belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-nested-write-allowed: true - x-merge-expands: '{"item": "Item"}' - x-merge-category: accounting - PurchaseOrderLineItemRequest: - type: object - description: |- - # The PurchaseOrderLineItem Object - ### Description - The `PurchaseOrderLineItem` object is used to represent a purchase order's line item. - - ### Usage Example - Fetch from the `GET PurchaseOrder` endpoint and view a company's purchase orders. - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '121222' - description: - type: string - nullable: true - description: A description of the good being purchased. - example: Pickleball paddles - unit_price: - type: number - format: double - nullable: true - description: The line item's unit price. - example: 25 - quantity: - type: number - format: double - nullable: true - description: The line item's quantity. - example: 10 - item: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Item' - nullable: true - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - x-merge-expands-to: Item - account: - type: string - format: uuid - nullable: true - description: The purchase order line item's account. - tracking_category: - type: string - format: uuid - nullable: true - description: The purchase order line item's associated tracking category. - deprecated: true - tracking_categories: - type: array - items: - type: string - format: uuid - nullable: true - example: - - f1214c24-2702-4617-b74b-3ddecfc0d384 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: The purchase order line item's associated tracking categories. - tax_amount: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The purchase order line item's tax amount. - example: 10 - total_line_amount: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The purchase order line item's total amount. - example: 260 - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The purchase order line item's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - tax_rate: - type: string - format: uuid - nullable: true - example: a12e7c20-1922-9df7-s75n-edfeewnn7384 - description: The tax rate that applies to this line item. - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The purchase order line item's exchange rate. - example: '2.9' - company: - type: string - format: uuid - nullable: true - description: The company the purchase order line item belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"item": "Item"}' - x-merge-category: accounting - PurchaseOrderRequest: - type: object - description: |- - # The PurchaseOrder Object - ### Description - The `PurchaseOrder` object is a record of request for a product or service between a buyer and seller. - - ### Usage Example - Fetch from the `LIST PurchaseOrders` endpoint and view a company's purchase orders. - properties: - status: - oneOf: - - $ref: '#/components/schemas/PurchaseOrderStatusEnum' - - type: string - nullable: true - description: |- - The purchase order's status. - - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `AUTHORIZED` - AUTHORIZED - * `BILLED` - BILLED - * `DELETED` - DELETED - issue_date: - type: string - format: date-time - nullable: true - description: The purchase order's issue date. - delivery_date: - type: string - format: date-time - nullable: true - description: The purchase order's delivery date. - delivery_address: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Address' - nullable: true - description: The purchase order's delivery address. - x-merge-expands-to: Address - customer: - type: string - format: uuid - nullable: true - description: The contact making the purchase order. - vendor: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The party fulfilling the purchase order. - x-merge-expands-to: Contact - memo: - type: string - nullable: true - description: A memo attached to the purchase order. - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the purchase order belongs to. - x-merge-expands-to: CompanyInfo - total_amount: - type: number - format: double - nullable: true - description: The purchase order's total amount. - payment_term: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PaymentTerm' - nullable: true - description: The payment term that applies to this transaction. - x-merge-expands-to: PaymentTerm - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The purchase order's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - inclusive_of_tax: - type: boolean - nullable: true - description: If the transaction is inclusive or exclusive of tax. `True` - if inclusive, `False` if exclusive. - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The purchase order's exchange rate. - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - x-merge-expands-to: TrackingCategory - line_items: - type: array - items: - $ref: '#/components/schemas/PurchaseOrderLineItemRequest' - x-merge-expands-to: PurchaseOrderLineItem - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"accounting_period": "AccountingPeriod", "company": "CompanyInfo", - "delivery_address": "Address", "line_items": "PurchaseOrderLineItem", "payment_term": - "PaymentTerm", "tracking_categories": "TrackingCategory", "vendor": "Contact"}' - x-merge-category: accounting - PurchaseOrderResponse: - type: object - properties: - model: - $ref: '#/components/schemas/PurchaseOrder' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: accounting - PurchaseOrderStatusEnum: - enum: - - DRAFT - - SUBMITTED - - AUTHORIZED - - BILLED - - DELETED - type: string - description: |- - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `AUTHORIZED` - AUTHORIZED - * `BILLED` - BILLED - * `DELETED` - DELETED - x-merge-category: accounting - RemoteData: - type: object - description: |- - # The RemoteData Object - ### Description - The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. - - ### Usage Example - TODO - properties: - path: - type: string - description: The third-party API path that is being called. - example: /platform-endpoint - data: - readOnly: true - description: The data returned from the third-party for this object in its - original, unnormalized format. - example: - - Varies by platform - required: - - path - x-merge-category: accounting - RemoteEndpointInfo: - type: object - properties: - method: - type: string - example: GET - url_path: - type: string - example: /example-url-path - field_traversal_path: - type: array - items: {} - example: - - example_key_name - required: - - field_traversal_path - - method - - url_path - x-merge-category: accounting - RemoteField: - type: object - properties: - remote_field_class: - oneOf: - - type: string - - $ref: '#/components/schemas/RemoteFieldClass' - x-merge-expands-to: RemoteFieldClass - value: - nullable: true - example: string - required: - - remote_field_class - x-merge-expands: '{"remote_field_class": "RemoteFieldClass"}' - x-merge-category: accounting - RemoteFieldAPI: - type: object - properties: - schema: - type: object - additionalProperties: {} - example: - type: string - remote_key_name: - type: string - example: example_remote_key_name - remote_endpoint_info: - $ref: '#/components/schemas/RemoteEndpointInfo' - example: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - type: array - items: {} - nullable: true - example: - - example - advanced_metadata: - allOf: - - $ref: '#/components/schemas/AdvancedMetadata' - nullable: true - coverage: - oneOf: - - type: integer - - type: number - format: double - nullable: true - readOnly: true - example: 0.33 - required: - - advanced_metadata - - remote_endpoint_info - - remote_key_name - - schema - x-merge-category: accounting - RemoteFieldAPIResponse: - type: object - properties: - Account: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - AccountingAttachment: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - BalanceSheet: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - CashFlowStatement: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - CompanyInfo: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Contact: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - IncomeStatement: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - CreditNote: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Item: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - PurchaseOrder: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - TrackingCategory: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - JournalEntry: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - TaxRate: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Invoice: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Payment: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Expense: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - VendorCredit: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Transaction: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - AccountingPeriod: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - GeneralLedgerTransaction: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - BankFeedAccount: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Employee: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - PaymentMethod: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Project: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - PaymentTerm: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - x-merge-category: accounting - RemoteFieldClass: - type: object - properties: - id: - type: string - display_name: - type: string - remote_key_name: - type: string - description: - type: string - is_custom: - type: boolean - is_required: - type: boolean - field_type: - $ref: '#/components/schemas/FieldTypeEnum' - field_format: - $ref: '#/components/schemas/FieldFormatEnum' - field_choices: - type: array - items: - type: string - item_schema: - $ref: '#/components/schemas/ItemSchema' - x-merge-category: accounting - RemoteFieldRequest: - type: object - properties: - remote_field_class: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/RemoteFieldClass' - example: b057d1d2-c204-4da8-a74c-c91d1a260614 - x-merge-expands-to: RemoteFieldClass - value: - nullable: true - example: string - required: - - remote_field_class - x-merge-expands: '{"remote_field_class": "RemoteFieldClass"}' - x-merge-category: accounting - RemoteKey: - type: object - description: |- - # The RemoteKey Object - ### Description - The `RemoteKey` object is used to represent a request for a new remote key. - - ### Usage Example - Post a `GenerateRemoteKey` to receive a new `RemoteKey`. - properties: - name: - type: string - example: Remote Deployment Key 1 - key: - type: string - example: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - required: - - key - - name - x-merge-category: accounting - RemoteKeyForRegenerationRequest: - type: object - description: |- - # The RemoteKeyForRegeneration Object - ### Description - The `RemoteKeyForRegeneration` object is used to exchange an old remote key for a new one - - ### Usage Example - Post a `RemoteKeyForRegeneration` to swap out an old remote key for a new one - properties: - name: - type: string - minLength: 1 - description: The name of the remote key - example: Remote Deployment Key 1 - required: - - name - x-merge-category: accounting - RemoteResponse: - type: object - description: |- - # The RemoteResponse Object - ### Description - The `RemoteResponse` object is used to represent information returned from a third-party endpoint. - - ### Usage Example - View the `RemoteResponse` returned from your `DataPassthrough`. - properties: - method: - type: string - example: GET - path: - type: string - example: /scooters - status: - type: integer - example: 200 - response: - example: - scooters: - - company: Lime - model: Gen 2.5 - - company: Bird - model: Bird Zero - response_headers: - type: object - additionalProperties: {} - example: - X-Page-Token: value - response_type: - allOf: - - $ref: '#/components/schemas/ResponseTypeEnum' - example: JSON - headers: - type: object - additionalProperties: {} - example: - EXTRA-HEADER: value - Authorization: - required: - - method - - path - - response - - status - x-merge-category: accounting - ReportItem: - type: object - description: |- - # The ReportItem Object - ### Description - The `ReportItem` object is used to represent a report item for a Balance Sheet, Cash Flow Statement or Profit and Loss Report. - - ### Usage Example - Fetch from the `GET BalanceSheet` endpoint and view the balance sheet's report items. - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '10299' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The report item's name. - example: Revenue - value: - type: number - format: double - nullable: true - description: The report item's value. - example: 1000 - sub_items: - type: array - items: - type: object - additionalProperties: {} - readOnly: true - example: - - remote_id: '10300' - name: Revenue - San Francisco - value: 500 - sub_items: [] - - remote_id: '10301' - name: Revenue - New York - value: 500 - sub_items: [] - company: - type: string - format: uuid - nullable: true - description: The company the report item belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - x-merge-nested-write-allowed: true - x-merge-category: accounting - RequestFormatEnum: - enum: - - JSON - - XML - - MULTIPART - type: string - description: |- - * `JSON` - JSON - * `XML` - XML - * `MULTIPART` - MULTIPART - x-merge-category: accounting - ResponseTypeEnum: - enum: - - JSON - - BASE64_GZIP - type: string - description: |- - * `JSON` - JSON - * `BASE64_GZIP` - BASE64_GZIP - x-merge-category: accounting - RoleEnum: - enum: - - ADMIN - - DEVELOPER - - MEMBER - - API - - SYSTEM - - MERGE_TEAM - type: string - description: |- - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - x-merge-category: accounting - SelectiveSyncConfigurationsUsageEnum: - enum: - - IN_NEXT_SYNC - - IN_LAST_SYNC - type: string - description: |- - * `IN_NEXT_SYNC` - IN_NEXT_SYNC - * `IN_LAST_SYNC` - IN_LAST_SYNC - x-merge-category: accounting - Status7d1Enum: - enum: - - ACTIVE - - ARCHIVED - type: string - description: |- - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - x-merge-category: accounting - Status895Enum: - enum: - - ACTIVE - - INACTIVE - type: string - description: |- - * `ACTIVE` - ACTIVE - * `INACTIVE` - INACTIVE - x-merge-category: accounting - StatusFd5Enum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - type: string - description: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - x-merge-category: accounting - SyncStatus: - type: object - description: |- - # The SyncStatus Object - ### Description - The `SyncStatus` object is used to represent the syncing state of an account - - ### Usage Example - View the `SyncStatus` for an account to see how recently its models were synced. - properties: - model_name: - type: string - example: Invoice - model_id: - type: string - example: accounting.Invoices - last_sync_start: - type: string - format: date-time - example: '2021-03-30T19:44:18.695973Z' - next_sync_start: - type: string - format: date-time - example: '2021-03-30T20:44:18.662942Z' - last_sync_result: - oneOf: - - $ref: '#/components/schemas/LastSyncResultEnum' - - type: string - example: DONE - last_sync_finished: - type: string - format: date-time - example: '2021-03-30T19:55:18.695973Z' - status: - oneOf: - - $ref: '#/components/schemas/StatusFd5Enum' - - type: string - example: SYNCING - is_initial_sync: - type: boolean - example: true - selective_sync_configurations_usage: - $ref: '#/components/schemas/SelectiveSyncConfigurationsUsageEnum' - required: - - is_initial_sync - - model_id - - model_name - - status - x-merge-sample-json: '{"model_name": "Candidate", "model_id": "ats.Candidate", - "last_sync_start": "2021-03-30T19:44:18.695973Z", "next_sync_start": "2021-03-30T20:44:18.662942Z", - "status": "SYNCING", "is_initial_sync": true}' - x-merge-category: accounting - TaxComponent: - type: object - description: |- - # The TaxRate Object - ### Description - The `TaxComponent` object is used to represent any sub-taxes that make up the `TaxRate`. - - ### Usage Example - Fetch from the `LIST TaxRates` endpoint and view tax components relevant to a tax rate. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '039111' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The tax rate’s name. - maxLength: 100 - example: Drink Tax Component - rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The tax component’s rate. - example: 15 - is_compound: - type: boolean - nullable: true - description: Returns True if the tax component is compound, False if not. - example: true - component_type: - oneOf: - - $ref: '#/components/schemas/ComponentTypeEnum' - - type: string - nullable: true - description: |- - Returns PURCHASE if the tax component corresponds to a purchase tax or SALES if the tax component corresponds to a sales tax. - - * `SALES` - SALES - * `PURCHASE` - PURCHASE - example: SALES - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - x-merge-nested-write-allowed: true - x-merge-category: accounting - TaxRate: - type: object - description: |- - # The TaxRate Object - ### Description - The `TaxRate` object is used to represent a tax rate. - - ### Usage Example - Fetch from the `LIST TaxRates` endpoint and view tax rates relevant to a company. - properties: - id: - type: string - format: uuid - readOnly: true - example: b82302de-852e-4e60-b050-edf9da3b7c02 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '039111' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The subsidiary that the tax rate belongs to (in the case of - multi-entity systems). - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - code: - type: string - nullable: true - description: The tax code associated with this tax rate or group of tax - rates from the third-party platform. - maxLength: 100 - example: '890' - name: - type: string - nullable: true - description: The tax rate’s name. - maxLength: 100 - example: State tax rate - description: - type: string - nullable: true - description: The tax rate's description. - example: Sales Tax - status: - oneOf: - - $ref: '#/components/schemas/Status7d1Enum' - - type: string - nullable: true - description: |- - The tax rate’s status - `ACTIVE` if an active tax rate, `ARCHIVED` if not active. - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - example: ACTIVE - country: - type: string - nullable: true - description: The country the tax rate is associated with. - maxLength: 100 - example: US - total_tax_rate: - type: number - format: double - nullable: true - description: The tax’s total tax rate - sum of the tax components (not compounded). - example: 15 - effective_tax_rate: - type: number - format: double - nullable: true - description: The tax rate’s effective tax rate - total amount of tax with - compounding. - example: 15 - tax_components: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TaxComponent' - example: - - remote_id: '039111' - is_compound: true - rate: 15 - component_type: SALES - name: Drink Tax Component - description: The related tax components of the tax rate. - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - x-merge-expands: '{"company": "CompanyInfo"}' - x-merge-category: accounting - TrackingCategory: - type: object - description: |- - # The TrackingCategory Object - ### Description - A `TrackingCategory` object represents a categorization method used to classify transactions within an accounting platform. They are often used to group records for reporting and analysis purposes. The most common types of `TrackingCategories` are Classes and Departments. - - ### Usage Example - Fetch from the `GET TrackingCategory` endpoint and view a company's tracking category. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '948201' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The tracking category's name. - example: Marketing Department - status: - oneOf: - - $ref: '#/components/schemas/Status7d1Enum' - - type: string - nullable: true - description: |- - The tracking category's status. - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - example: ACTIVE - category_type: - oneOf: - - $ref: '#/components/schemas/CategoryTypeEnum' - - type: string - nullable: true - description: |- - The tracking category’s type. - - * `CLASS` - CLASS - * `DEPARTMENT` - DEPARTMENT - example: DEPARTMENT - parent_category: - type: string - format: uuid - nullable: true - example: d25d609b-945f-4762-b55a-1c8fb220c43c - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the GeneralLedgerTransaction belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - x-merge-expands: '{"company": "CompanyInfo"}' - x-merge-category: accounting - Transaction: - type: object - description: |- - # The Transaction Object - ### Description - The `Transaction` common model includes records of all types of transactions that do not appear in other common models. The type of transaction can be identified through the type field. More specifically, it will contain all types of transactions outside of: - * __Credit Notes__ - * __Expenses__ - * __Invoices__ - * __Journal Entries__ - * __Payments__ - * __Purchase Orders__ - * __Vendor Credits__ - - ### Usage Example - Fetch from the `GET Transaction` endpoint and view a company's transactions. - properties: - id: - type: string - format: uuid - readOnly: true - example: 0048ea5b-911e-4dff-9364-92070dea62ff - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '239741' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - transaction_type: - type: string - nullable: true - description: The type of transaction, which can by any transaction object - not already included in Merge’s common model. - example: estimate - number: - type: string - nullable: true - description: The transaction's number used for identifying purposes. - example: '122' - transaction_date: - type: string - format: date-time - nullable: true - description: The date upon which the transaction occurred. - example: '2020-03-31T00:00:00Z' - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The transaction's account. - example: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 - x-merge-expands-to: Account - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The contact to whom the transaction relates to. - example: 2c22ce34-5c6e-4fc7-a594-7f26bb4cf78b - x-merge-expands-to: Contact - inclusive_of_tax: - type: boolean - nullable: true - description: If the transaction is inclusive or exclusive of tax. `True` - if inclusive, `False` if exclusive. - total_amount: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The total amount being paid after taxes. - example: 260 - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The transaction's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The transaction's exchange rate. - example: '2.9' - company: - type: string - format: uuid - nullable: true - description: The company the transaction belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - x-merge-expands-to: TrackingCategory - line_items: - type: array - items: - $ref: '#/components/schemas/TransactionLineItem' - readOnly: true - example: - - remote_id: '121222' - memo: Pickleball paddles - unit_price: '25.0' - quantity: '10.0' - item: 0958cbc6-6040-430a-848e-aafacbadf4ae - account: 2b38c085-2620-4269-b5ec-75dd9095ed2c - tracking_categories: - - f1214c24-2702-4617-b74b-3ddecfc0d384 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - total_line_amount: 260 - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - currency: USD - exchange_rate: '2.9' - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: false - - memo: Pickleball balls - unit_price: 1 - quantity: 10 - item: 249c9faa-3045-4a31-953b-8f22d3613301 - account: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 - tracking_categories: - - f1214c24-2702-4617-b74b-3ddecfc0d384 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - total_line_amount: 20 - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - x-merge-expands-to: TransactionLineItem - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - accounting_period: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/AccountingPeriod' - nullable: true - description: The accounting period that the Transaction was generated in. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: AccountingPeriod - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - x-merge-model-tooltip: - title: - content: A positive `net_amount` means the line represents a debit and a negative - `net_amount` represents a credit. - x-merge-expands: '{"account": "Account", "accounting_period": "AccountingPeriod", - "contact": "Contact", "line_items": "TransactionLineItem", "tracking_categories": - "TrackingCategory"}' - x-merge-category: accounting - TransactionCurrencyEnum: - enum: - - XUA - - AFN - - AFA - - ALL - - ALK - - DZD - - ADP - - AOA - - AOK - - AON - - AOR - - ARA - - ARS - - ARM - - ARP - - ARL - - AMD - - AWG - - AUD - - ATS - - AZN - - AZM - - BSD - - BHD - - BDT - - BBD - - BYN - - BYB - - BYR - - BEF - - BEC - - BEL - - BZD - - BMD - - BTN - - BOB - - BOL - - BOV - - BOP - - BAM - - BAD - - BAN - - BWP - - BRC - - BRZ - - BRE - - BRR - - BRN - - BRB - - BRL - - GBP - - BND - - BGL - - BGN - - BGO - - BGM - - BUK - - BIF - - XPF - - KHR - - CAD - - CVE - - KYD - - XAF - - CLE - - CLP - - CLF - - CNX - - CNY - - CNH - - COP - - COU - - KMF - - CDF - - CRC - - HRD - - HRK - - CUC - - CUP - - CYP - - CZK - - CSK - - DKK - - DJF - - DOP - - NLG - - XCD - - DDM - - ECS - - ECV - - EGP - - GQE - - ERN - - EEK - - ETB - - EUR - - XBA - - XEU - - XBB - - XBC - - XBD - - FKP - - FJD - - FIM - - FRF - - XFO - - XFU - - GMD - - GEK - - GEL - - DEM - - GHS - - GHC - - GIP - - XAU - - GRD - - GTQ - - GWP - - GNF - - GNS - - GYD - - HTG - - HNL - - HKD - - HUF - - IMP - - ISK - - ISJ - - INR - - IDR - - IRR - - IQD - - IEP - - ILS - - ILP - - ILR - - ITL - - JMD - - JPY - - JOD - - KZT - - KES - - KWD - - KGS - - LAK - - LVL - - LVR - - LBP - - LSL - - LRD - - LYD - - LTL - - LTT - - LUL - - LUC - - LUF - - MOP - - MKD - - MKN - - MGA - - MGF - - MWK - - MYR - - MVR - - MVP - - MLF - - MTL - - MTP - - MRU - - MRO - - MUR - - MXV - - MXN - - MXP - - MDC - - MDL - - MCF - - MNT - - MAD - - MAF - - MZE - - MZN - - MZM - - MMK - - NAD - - NPR - - ANG - - TWD - - NZD - - NIO - - NIC - - NGN - - KPW - - NOK - - OMR - - PKR - - XPD - - PAB - - PGK - - PYG - - PEI - - PEN - - PES - - PHP - - XPT - - PLN - - PLZ - - PTE - - GWE - - QAR - - XRE - - RHD - - RON - - ROL - - RUB - - RUR - - RWF - - SVC - - WST - - SAR - - RSD - - CSD - - SCR - - SLL - - XAG - - SGD - - SKK - - SIT - - SBD - - SOS - - ZAR - - ZAL - - KRH - - KRW - - KRO - - SSP - - SUR - - ESP - - ESA - - ESB - - XDR - - LKR - - SHP - - XSU - - SDD - - SDG - - SDP - - SRD - - SRG - - SZL - - SEK - - CHF - - SYP - - STN - - STD - - TVD - - TJR - - TJS - - TZS - - XTS - - THB - - XXX - - TPE - - TOP - - TTD - - TND - - TRY - - TRL - - TMT - - TMM - - USD - - USN - - USS - - UGX - - UGS - - UAH - - UAK - - AED - - UYW - - UYU - - UYP - - UYI - - UZS - - VUV - - VES - - VEB - - VEF - - VND - - VNN - - CHE - - CHW - - XOF - - YDD - - YER - - YUN - - YUD - - YUM - - YUR - - ZWN - - ZRN - - ZRZ - - ZMW - - ZMK - - ZWD - - ZWR - - ZWL - type: string - description: |- - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - x-merge-category: accounting - TransactionLineItem: - type: object - description: |- - # The TransactionLineItem Object - ### Description - The `TransactionLineItem` object is used to represent a transaction's line items. - - ### Usage Example - Fetch from the `GET TransactionLineItem` endpoint and view the transaction's line items. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '121222' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - memo: - type: string - nullable: true - description: An internal note used by the business to clarify purpose of - the transaction. - example: Pickleball paddles - unit_price: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The line item's unit price. - example: '25.0' - quantity: - type: string - format: decimal - pattern: ^-?\d{0,24}(?:\.\d{0,8})?$ - nullable: true - description: The line item's quantity. - example: '10.0' - item: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Item' - nullable: true - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - x-merge-expands-to: Item - account: - type: string - format: uuid - nullable: true - description: The line item's account. - example: 2b38c085-2620-4269-b5ec-75dd9095ed2c - tracking_category: - type: string - format: uuid - nullable: true - description: The line's associated tracking category. - deprecated: true - tracking_categories: - type: array - items: - type: string - format: uuid - nullable: true - example: - - f1214c24-2702-4617-b74b-3ddecfc0d384 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: The transaction line item's associated tracking categories. - total_line_amount: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The line item's total. - example: 260 - tax_rate: - type: string - format: uuid - nullable: true - example: a12e7c20-1922-9df7-s75n-edfeewnn7384 - description: The tax rate that applies to this line item. - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The line item's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The line item's exchange rate. - example: '2.9' - company: - type: string - format: uuid - nullable: true - description: The company the line belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - x-merge-nested-write-allowed: true - x-merge-expands: '{"item": "Item"}' - x-merge-category: accounting - Type2bbEnum: - enum: - - INVENTORY - - NON_INVENTORY - - SERVICE - - UNKNOWN - type: string - description: |- - * `INVENTORY` - INVENTORY - * `NON_INVENTORY` - NON_INVENTORY - * `SERVICE` - SERVICE - * `UNKNOWN` - UNKNOWN - x-merge-category: accounting - UnderlyingTransactionTypeEnum: - enum: - - INVOICE - - EXPENSE - - TRANSACTION - - JOURNAL_ENTRY - - PAYMENT - - VENDOR_CREDIT - - CREDIT_NOTE - type: string - description: |- - * `INVOICE` - INVOICE - * `EXPENSE` - EXPENSE - * `TRANSACTION` - TRANSACTION - * `JOURNAL_ENTRY` - JOURNAL_ENTRY - * `PAYMENT` - PAYMENT - * `VENDOR_CREDIT` - VENDOR_CREDIT - * `CREDIT_NOTE` - CREDIT_NOTE - x-merge-category: accounting - ValidationProblemSource: - type: object - properties: - pointer: - type: string - required: - - pointer - x-merge-category: accounting - VendorCredit: - type: object - description: |- - # The VendorCredit Object - ### Description - A `VendorCredit` is transaction issued by a vendor to the accounting company, indicating a reduction or cancellation of the amount owed to the vendor. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a purchasing transaction. A `VendorCredit` can be applied to `Accounts Payable` Invoices to decrease the overall amount of the `Invoice`. - - ### Usage Example - Fetch from the `GET VendorCredit` endpoint and view a company's vendor credits. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '088899' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - number: - type: string - nullable: true - description: The vendor credit's number. - example: '6' - transaction_date: - type: string - format: date-time - nullable: true - description: The vendor credit's transaction date. - example: '2020-03-31T00:00:00Z' - vendor: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The vendor that owes the gift or refund. - example: 3d263469-51a1-4766-9205-f6c997826be1 - x-merge-expands-to: Contact - total_amount: - type: number - format: double - nullable: true - description: The vendor credit's total amount. - example: 10000 - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The vendor credit's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The vendor credit's exchange rate. - example: '2.9' - inclusive_of_tax: - type: boolean - nullable: true - description: If the transaction is inclusive or exclusive of tax. `True` - if inclusive, `False` if exclusive. - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the vendor credit belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - lines: - type: array - items: - $ref: '#/components/schemas/VendorCreditLine' - readOnly: true - example: - - remote_id: '121222' - net_amount: 25.54 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - contact: 908934-49j9-093f-0989-908923908 - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - exchange_rate: '2.9' - description: Gifted Merge Credit - account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: false - - remote_id: '121223' - net_amount: 10 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: Refund for overpayment - account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - x-merge-expands-to: VendorCreditLine - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - x-merge-expands-to: TrackingCategory - applied_to_lines: - type: array - items: - $ref: '#/components/schemas/VendorCreditApplyLineForVendorCredit' - description: A list of VendorCredit Applied to Lines objects. - example: - - invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - accounting_period: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/AccountingPeriod' - nullable: true - description: The accounting period that the VendorCredit was generated in. - example: 9b840d2-686a-465a-8a8e-7b028498f8e4 - x-merge-expands-to: AccountingPeriod - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - x-merge-expands: '{"accounting_period": "AccountingPeriod", "company": "CompanyInfo", - "lines": "VendorCreditLine", "tracking_categories": "TrackingCategory", "vendor": - "Contact"}' - x-merge-category: accounting - VendorCreditApplyLineForInvoice: - type: object - description: |- - # The VendorCreditApplyLine Object - ### Description - The `VendorCreditApplyLine` object is used to represent a applied vendor credit. - - ### Usage Example - Fetch from the `GET VendorCredit` endpoint and view the vendor credit's applied to lines. - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '088899' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - vendor_credit: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/VendorCredit' - nullable: true - example: f776d7e886ebcc3c56ff31b5ab2608c10f9fd823 - x-merge-expands-to: VendorCredit - applied_date: - type: string - format: date-time - nullable: true - description: Date that the vendor credit is applied to the invoice. - example: '2020-03-31T00:00:00Z' - applied_amount: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The amount of the VendorCredit applied to the invoice. - example: '2.9' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - x-merge-nested-write-allowed: true - x-merge-expands: '{"vendor_credit": "VendorCredit"}' - x-merge-category: accounting - VendorCreditApplyLineForVendorCredit: - type: object - description: |- - # The VendorCreditApplyLine Object - ### Description - The `VendorCreditApplyLine` object is used to represent a applied vendor credit. - - ### Usage Example - Fetch from the `GET VendorCredit` endpoint and view the vendor credit's applied to lines. - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '088899' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - invoice: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Invoice' - nullable: true - example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - x-merge-expands-to: Invoice - applied_date: - type: string - format: date-time - nullable: true - description: Date that the vendor credit is applied to the invoice. - example: '2020-03-31T00:00:00Z' - applied_amount: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The amount of the VendorCredit applied to the invoice. - example: '2.9' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - x-merge-nested-write-allowed: true - x-merge-expands: '{"invoice": "Invoice"}' - x-merge-category: accounting - VendorCreditApplyLineForVendorCreditRequest: - type: object - description: |- - # The VendorCreditApplyLine Object - ### Description - The `VendorCreditApplyLine` object is used to represent a applied vendor credit. - - ### Usage Example - Fetch from the `GET VendorCredit` endpoint and view the vendor credit's applied to lines. - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '088899' - invoice: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Invoice' - nullable: true - example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - x-merge-expands-to: Invoice - applied_date: - type: string - format: date-time - nullable: true - description: Date that the vendor credit is applied to the invoice. - example: '2020-03-31T00:00:00Z' - applied_amount: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The amount of the VendorCredit applied to the invoice. - example: '2.9' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"invoice": "Invoice"}' - x-merge-category: accounting - VendorCreditEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/VendorCreditRequest' - required: - - model - x-merge-category: accounting - VendorCreditLine: - type: object - description: |- - # The VendorCreditLine Object - ### Description - The `VendorCreditLine` object is used to represent a vendor credit's line items. - - ### Usage Example - Fetch from the `GET VendorCredit` endpoint and view the vendor credit's line items. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '121222' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - net_amount: - type: number - format: double - nullable: true - description: The full value of the credit. - example: 25.54 - tracking_category: - type: string - format: uuid - nullable: true - description: The line's associated tracking category. - deprecated: true - tracking_categories: - type: array - items: - type: string - format: uuid - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: The vendor credit line item's associated tracking categories. - description: - type: string - nullable: true - description: The line's description. - example: Gifted Merge Credit - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The line's account. - example: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - x-merge-expands-to: Account - company: - type: string - format: uuid - nullable: true - description: The company the line belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - project: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Project' - nullable: true - example: 22e65a5d-2df5-4e6e-884a-e538d0339000 - x-merge-expands-to: Project - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - example: 908934-49j9-093f-0989-908923908 - x-merge-expands-to: Contact - tax_rate: - type: string - format: uuid - nullable: true - example: a12e7c20-1922-9df7-s75n-edfeewnn7384 - description: The tax rate that applies to this line item. - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The vendor credit line item's exchange rate. - example: '2.9' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - x-merge-nested-write-allowed: true - x-merge-expands: '{"account": "Account", "contact": "Contact", "project": "Project"}' - x-merge-category: accounting - VendorCreditLineRequest: - type: object - description: |- - # The VendorCreditLine Object - ### Description - The `VendorCreditLine` object is used to represent a vendor credit's line items. - - ### Usage Example - Fetch from the `GET VendorCredit` endpoint and view the vendor credit's line items. - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '121222' - net_amount: - type: number - format: double - nullable: true - description: The full value of the credit. - example: 25.54 - tracking_category: - type: string - format: uuid - nullable: true - description: The line's associated tracking category. - deprecated: true - tracking_categories: - type: array - items: - type: string - format: uuid - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: The vendor credit line item's associated tracking categories. - description: - type: string - nullable: true - description: The line's description. - example: Gifted Merge Credit - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The line's account. - example: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - x-merge-expands-to: Account - company: - type: string - format: uuid - nullable: true - description: The company the line belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - project: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Project' - nullable: true - example: 22e65a5d-2df5-4e6e-884a-e538d0339000 - x-merge-expands-to: Project - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - example: 908934-49j9-093f-0989-908923908 - x-merge-expands-to: Contact - tax_rate: - type: string - format: uuid - nullable: true - example: a12e7c20-1922-9df7-s75n-edfeewnn7384 - description: The tax rate that applies to this line item. - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The vendor credit line item's exchange rate. - example: '2.9' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"account": "Account", "contact": "Contact", "project": "Project"}' - x-merge-category: accounting - VendorCreditRequest: - type: object - description: |- - # The VendorCredit Object - ### Description - A `VendorCredit` is transaction issued by a vendor to the accounting company, indicating a reduction or cancellation of the amount owed to the vendor. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a purchasing transaction. A `VendorCredit` can be applied to `Accounts Payable` Invoices to decrease the overall amount of the `Invoice`. - - ### Usage Example - Fetch from the `GET VendorCredit` endpoint and view a company's vendor credits. - properties: - number: - type: string - nullable: true - description: The vendor credit's number. - example: '6' - transaction_date: - type: string - format: date-time - nullable: true - description: The vendor credit's transaction date. - example: '2020-03-31T00:00:00Z' - vendor: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The vendor that owes the gift or refund. - example: 3d263469-51a1-4766-9205-f6c997826be1 - x-merge-expands-to: Contact - total_amount: - type: number - format: double - nullable: true - description: The vendor credit's total amount. - example: 10000 - currency: - oneOf: - - $ref: '#/components/schemas/TransactionCurrencyEnum' - - type: string - nullable: true - description: |- - The vendor credit's currency. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - exchange_rate: - type: string - format: decimal - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - nullable: true - description: The vendor credit's exchange rate. - example: '2.9' - inclusive_of_tax: - type: boolean - nullable: true - description: If the transaction is inclusive or exclusive of tax. `True` - if inclusive, `False` if exclusive. - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/CompanyInfo' - nullable: true - description: The company the vendor credit belongs to. - example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - x-merge-expands-to: CompanyInfo - tracking_categories: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/TrackingCategory' - nullable: true - example: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - x-merge-expands-to: TrackingCategory - applied_to_lines: - type: array - items: - $ref: '#/components/schemas/VendorCreditApplyLineForVendorCreditRequest' - description: A list of VendorCredit Applied to Lines objects. - example: - - invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - accounting_period: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/AccountingPeriod' - nullable: true - description: The accounting period that the VendorCredit was generated in. - example: 9b840d2-686a-465a-8a8e-7b028498f8e4 - x-merge-expands-to: AccountingPeriod - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"accounting_period": "AccountingPeriod", "company": "CompanyInfo", - "lines": "VendorCreditLine", "tracking_categories": "TrackingCategory", "vendor": - "Contact"}' - x-merge-category: accounting - VendorCreditResponse: - type: object - properties: - model: - $ref: '#/components/schemas/VendorCredit' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: accounting - WarningValidationProblem: - type: object - properties: - source: - $ref: '#/components/schemas/ValidationProblemSource' - example: - pointer: /age - title: - type: string - example: Unrecognized Field - detail: - type: string - example: An unrecognized field, age, was passed in with request data. - problem_type: - type: string - example: UNRECOGNIZED_FIELD - required: - - detail - - problem_type - - title - x-merge-category: accounting - WebhookReceiver: - type: object - properties: - event: - type: string - is_active: - type: boolean - key: - type: string - required: - - event - - is_active - x-merge-category: accounting - WebhookReceiverRequest: - type: object - properties: - event: - type: string - minLength: 1 - is_active: - type: boolean - key: - type: string - minLength: 1 - required: - - event - - is_active - x-merge-category: accounting - securitySchemes: - tokenAuth: - type: http - scheme: bearer - description: Token-based authentication with required prefix "Bearer" - x-fern-token-variable-name: api_key -servers: -- url: https://api.merge.dev/api/accounting/v1 - description: Production - x-fern-server-name: Production -- url: https://api-sandbox.merge.dev/api/accounting/v1 - description: Sandbox - x-fern-server-name: Sandbox -- url: https://api-eu.merge.dev/api/accounting/v1 - description: Production EU - x-fern-server-name: ProductionEU -- url: https://api-ap.merge.dev/api/accounting/v1 - description: Production APSE1 - x-fern-server-name: ProductionAPSE1 diff --git a/.mock/ats_v3.yml b/.mock/ats_v3.yml deleted file mode 100644 index c478403cd..000000000 --- a/.mock/ats_v3.yml +++ /dev/null @@ -1,10845 +0,0 @@ -openapi: 3.0.3 -info: - title: Merge ATS API - version: '1.0' - description: The unified API for building rich integrations with multiple Applicant - Tracking System platforms. - contact: - name: Merge Team - url: https://www.merge.dev/ - email: hello@merge.dev -paths: - /ats/v1/account-details: - get: - operationId: account_details_retrieve - description: Get details for a linked account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - account-details - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AccountDetails' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/account-token/{public_token}: - get: - operationId: account_token_retrieve - description: Returns the account token for the end user with the provided public - token. - parameters: - - in: path - name: public_token - schema: - type: string - required: true - tags: - - account-token - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AccountToken' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/activities: - get: - operationId: activities_list - description: Returns a list of `Activity` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - user - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandUser: - value: user - summary: Expand User - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - activity_type - - activity_type,visibility - - visibility - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesActivityType,Visibility: - value: activity_type,visibility - summary: Original Enum Values Activity_type, Visibility - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - activity_type - - activity_type,visibility - - visibility - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesActivityType,Visibility: - value: activity_type,visibility - summary: Original Enum Values Activity_type, Visibility - - in: query - name: user_id - schema: - type: string - description: If provided, will only return activities done by this user. - examples: - UserId: - summary: user_id - tags: - - activities - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedActivityList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: activities_create - description: Creates an `Activity` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - activities - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ActivityEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/ActivityEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/ActivityEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/ActivityResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /ats/v1/activities/{id}: - get: - operationId: activities_retrieve - description: Returns an `Activity` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - user - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandUser: - value: user - summary: Expand User - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - activity_type - - activity_type,visibility - - visibility - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesActivityType,Visibility: - value: activity_type,visibility - summary: Original Enum Values Activity_type, Visibility - - in: query - name: show_enum_origins - schema: - type: string - enum: - - activity_type - - activity_type,visibility - - visibility - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesActivityType,Visibility: - value: activity_type,visibility - summary: Original Enum Values Activity_type, Visibility - tags: - - activities - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Activity' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/activities/meta/post: - get: - operationId: activities_meta_post_retrieve - description: Returns metadata for `Activity` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - activities - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/applications: - get: - operationId: applications_list - description: Returns a list of `Application` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: candidate_id - schema: - type: string - description: If provided, will only return applications for this candidate. - examples: - CandidateId: - summary: candidate_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: credited_to_id - schema: - type: string - description: If provided, will only return applications credited to this user. - examples: - CreditedToId: - summary: credited_to_id - - in: query - name: current_stage_id - schema: - type: string - description: If provided, will only return applications at this interview - stage. - examples: - CurrentStageId: - summary: current_stage_id - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - candidate - - credited_to - - current_stage - - job - - offers - - reject_reason - - screening_question_answers - - screening_question_answers.question - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandOffers,ScreeningQuestionAnswers,ScreeningQuestionAnswers.question,Candidate,Job,CreditedTo,CurrentStage,RejectReason: - value: - offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason - summary: Expand Offers, Screening_question_answers, Screening_question_answers.question, - Candidate, Job, Credited_to, Current_stage, Reject_reason - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: job_id - schema: - type: string - description: If provided, will only return applications for this job. - examples: - JobId: - summary: job_id - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: reject_reason_id - schema: - type: string - description: If provided, will only return applications with this reject reason. - examples: - RejectReasonId: - summary: reject_reason_id - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: source - schema: - type: string - nullable: true - description: If provided, will only return applications with this source. - tags: - - applications - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedApplicationList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: applications_create - description: | - Creates an `Application` object with the given values. - For certain integrations, but not all, our API detects duplicate candidates and will associate applications with existing records in the third-party. New candidates are created and automatically linked to the application. - - See our [Help Center article](https://help.merge.dev/en/articles/10012366-updates-to-post-applications-oct-2024) for detailed support per integration. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - applications - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ApplicationEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/ApplicationEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/ApplicationEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/ApplicationResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/applications/{id}: - get: - operationId: applications_retrieve - description: Returns an `Application` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - candidate - - credited_to - - current_stage - - job - - offers - - reject_reason - - screening_question_answers - - screening_question_answers.question - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandOffers,ScreeningQuestionAnswers,ScreeningQuestionAnswers.question,Candidate,Job,CreditedTo,CurrentStage,RejectReason: - value: - offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason - summary: Expand Offers, Screening_question_answers, Screening_question_answers.question, - Candidate, Job, Credited_to, Current_stage, Reject_reason - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - applications - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Application' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/applications/{id}/change-stage: - post: - operationId: applications_change_stage_create - description: Updates the `current_stage` field of an `Application` object - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - applications - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateApplicationStageRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/UpdateApplicationStageRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/UpdateApplicationStageRequest' - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/ApplicationResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /ats/v1/applications/meta/post: - get: - operationId: applications_meta_post_retrieve - description: Returns metadata for `Application` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: application_remote_template_id - schema: - type: string - description: The template ID associated with the nested application in the - request. - tags: - - applications - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/async-passthrough: - post: - operationId: async_passthrough_create - description: Asynchronously pull data from an endpoint not currently supported - by Merge. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - async-passthrough - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AsyncPassthroughReciept' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/async-passthrough/{async_passthrough_receipt_id}: - get: - operationId: async_passthrough_retrieve - description: Retrieves data from earlier async-passthrough POST request - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: async_passthrough_receipt_id - schema: - type: string - format: uuid - required: true - tags: - - async-passthrough - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/RemoteResponse' - - type: string - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/attachments: - get: - operationId: attachments_list - description: Returns a list of `Attachment` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: candidate_id - schema: - type: string - description: If provided, will only return attachments for this candidate. - examples: - CandidateId: - summary: candidate_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - candidate - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCandidate: - value: candidate - summary: Expand Candidate - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - attachment_type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesAttachmentType: - value: attachment_type - summary: Original Enum Values Attachment_type - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - attachment_type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesAttachmentType: - value: attachment_type - summary: Original Enum Values Attachment_type - tags: - - attachments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAttachmentList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: attachments_create - description: Creates an `Attachment` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - attachments - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AttachmentEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/AttachmentEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/AttachmentEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/AttachmentResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/attachments/{id}: - get: - operationId: attachments_retrieve - description: Returns an `Attachment` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - candidate - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCandidate: - value: candidate - summary: Expand Candidate - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - attachment_type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesAttachmentType: - value: attachment_type - summary: Original Enum Values Attachment_type - - in: query - name: show_enum_origins - schema: - type: string - enum: - - attachment_type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesAttachmentType: - value: attachment_type - summary: Original Enum Values Attachment_type - tags: - - attachments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Attachment' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/attachments/meta/post: - get: - operationId: attachments_meta_post_retrieve - description: Returns metadata for `Attachment` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - attachments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/audit-trail: - get: - operationId: audit_trail_list - description: Gets a list of audit trail events. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_date - schema: - type: string - description: If included, will only include audit trail events that occurred - before this time - - in: query - name: event_type - schema: - type: string - description: 'If included, will only include events with the given event type. - Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, - `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, - `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, - `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, - `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, - `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, - `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, - `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, - `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, - `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`' - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: start_date - schema: - type: string - description: If included, will only include audit trail events that occurred - after this time - - in: query - name: user_email - schema: - type: string - description: If provided, this will return events associated with the specified - user email. Please note that the email address reflects the user's email - at the time of the event, and may not be their current email. - tags: - - audit-trail - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAuditLogEventList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/available-actions: - get: - operationId: available_actions_retrieve - description: Returns a list of models and actions available for an account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - available-actions - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AvailableActions' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/candidates: - get: - operationId: candidates_list - description: Returns a list of `Candidate` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: email_addresses - schema: - type: string - description: If provided, will only return candidates with these email addresses; - multiple addresses can be separated by commas. - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - applications - - attachments - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandApplications,Attachments: - value: applications,attachments - summary: Expand Applications, Attachments - explode: false - - in: query - name: first_name - schema: - type: string - nullable: true - description: If provided, will only return candidates with this first name. - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: last_name - schema: - type: string - nullable: true - description: If provided, will only return candidates with this last name. - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: tags - schema: - type: string - description: If provided, will only return candidates with these tags; multiple - tags can be separated by commas. - tags: - - candidates - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedCandidateList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: candidates_create - description: Creates a `Candidate` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - candidates - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CandidateEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/CandidateEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/CandidateEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/CandidateResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/candidates/{id}: - get: - operationId: candidates_retrieve - description: Returns a `Candidate` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - applications - - attachments - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandApplications,Attachments: - value: applications,attachments - summary: Expand Applications, Attachments - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - candidates - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Candidate' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - patch: - operationId: candidates_partial_update - description: Updates a `Candidate` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - candidates - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedCandidateEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedCandidateEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedCandidateEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CandidateResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /ats/v1/candidates/ignore/{model_id}: - post: - operationId: candidates_ignore_create - description: Ignores a specific row based on the `model_id` in the url. These - records will have their properties set to null, and will not be updated in - future syncs. The "reason" and "message" fields in the request body will be - stored for audit purposes. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: model_id - schema: - type: string - format: uuid - required: true - tags: - - candidates - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/IgnoreCommonModelRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/IgnoreCommonModelRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/IgnoreCommonModelRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - description: No response body - x-extra-tags: - - ignore-model - /ats/v1/candidates/meta/patch/{id}: - get: - operationId: candidates_meta_patch_retrieve - description: Returns metadata for `Candidate` PATCHs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - tags: - - candidates - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-patch: META_PATCH - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/candidates/meta/post: - get: - operationId: candidates_meta_post_retrieve - description: Returns metadata for `Candidate` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - candidates - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/default-scopes: - get: - operationId: default_scopes_retrieve - description: Get the default permissions for Merge Common Models and fields - across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - tags: - - scopes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/delete-account: - post: - operationId: delete_account_delete - description: Delete a linked account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - delete-account - security: - - tokenAuth: [] - responses: - '200': - description: No response body - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/departments: - get: - operationId: departments_list - description: Returns a list of `Department` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - departments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedDepartmentList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/departments/{id}: - get: - operationId: departments_retrieve - description: Returns a `Department` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - departments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Department' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/eeocs: - get: - operationId: eeocs_list - description: Returns a list of `EEOC` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: candidate_id - schema: - type: string - description: If provided, will only return EEOC info for this candidate. - examples: - CandidateId: - summary: candidate_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - candidate - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCandidate: - value: candidate - summary: Expand Candidate - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - disability_status - - disability_status,gender - - disability_status,gender,race - - disability_status,gender,race,veteran_status - - disability_status,gender,veteran_status - - disability_status,race - - disability_status,race,veteran_status - - disability_status,veteran_status - - gender - - gender,race - - gender,race,veteran_status - - gender,veteran_status - - race - - race,veteran_status - - veteran_status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesDisabilityStatus,Gender,Race,VeteranStatus: - value: disability_status,gender,race,veteran_status - summary: Original Enum Values Disability_status, Gender, Race, Veteran_status - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - disability_status - - disability_status,gender - - disability_status,gender,race - - disability_status,gender,race,veteran_status - - disability_status,gender,veteran_status - - disability_status,race - - disability_status,race,veteran_status - - disability_status,veteran_status - - gender - - gender,race - - gender,race,veteran_status - - gender,veteran_status - - race - - race,veteran_status - - veteran_status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesDisabilityStatus,Gender,Race,VeteranStatus: - value: disability_status,gender,race,veteran_status - summary: Original Enum Values Disability_status, Gender, Race, Veteran_status - tags: - - eeocs - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedEEOCList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/eeocs/{id}: - get: - operationId: eeocs_retrieve - description: Returns an `EEOC` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - candidate - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandCandidate: - value: candidate - summary: Expand Candidate - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - disability_status - - disability_status,gender - - disability_status,gender,race - - disability_status,gender,race,veteran_status - - disability_status,gender,veteran_status - - disability_status,race - - disability_status,race,veteran_status - - disability_status,veteran_status - - gender - - gender,race - - gender,race,veteran_status - - gender,veteran_status - - race - - race,veteran_status - - veteran_status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesDisabilityStatus,Gender,Race,VeteranStatus: - value: disability_status,gender,race,veteran_status - summary: Original Enum Values Disability_status, Gender, Race, Veteran_status - - in: query - name: show_enum_origins - schema: - type: string - enum: - - disability_status - - disability_status,gender - - disability_status,gender,race - - disability_status,gender,race,veteran_status - - disability_status,gender,veteran_status - - disability_status,race - - disability_status,race,veteran_status - - disability_status,veteran_status - - gender - - gender,race - - gender,race,veteran_status - - gender,veteran_status - - race - - race,veteran_status - - veteran_status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesDisabilityStatus,Gender,Race,VeteranStatus: - value: disability_status,gender,race,veteran_status - summary: Original Enum Values Disability_status, Gender, Race, Veteran_status - tags: - - eeocs - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/EEOC' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/field-mappings: - get: - operationId: field_mappings_retrieve - description: Get all Field Mappings for this Linked Account. Field Mappings - are mappings between third-party Remote Fields and user defined Merge fields. - [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: exclude_remote_field_metadata - schema: - type: boolean - description: If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` - will be null). This will increase the speed of the request since these fields - require some calculations. - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingApiInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: field_mappings_create - description: Create new Field Mappings that will be available after the next - scheduled sync. This will cause the next sync for this Linked Account to sync - **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: exclude_remote_field_metadata - schema: - type: boolean - description: If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` - will be null). This will increase the speed of the request since these fields - require some calculations. - tags: - - field-mapping - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/field-mappings/{field_mapping_id}: - patch: - operationId: field_mappings_partial_update - description: Create or update existing Field Mappings for a Linked Account. - Changes will be reflected after the next scheduled sync. This will cause the - next sync for this Linked Account to sync **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: field_mapping_id - schema: - type: string - format: uuid - required: true - tags: - - field-mapping - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - delete: - operationId: field_mappings_destroy - description: Deletes Field Mappings for a Linked Account. All data related to - this Field Mapping will be deleted and these changes will be reflected after - the next scheduled sync. This will cause the next sync for this Linked Account - to sync **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: field_mapping_id - schema: - type: string - format: uuid - required: true - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '204': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/generate-key: - post: - operationId: generate_key_create - description: Create a remote key. - tags: - - generate-key - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKey' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/interviews: - get: - operationId: interviews_list - description: Returns a list of `ScheduledInterview` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: application_id - schema: - type: string - description: If provided, will only return interviews for this application. - examples: - ApplicationId: - summary: application_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - application - - interviewers - - job_interview_stage - - organizer - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandInterviewers,Organizer,Application,JobInterviewStage: - value: interviewers,organizer,application,job_interview_stage - summary: Expand Interviewers, Organizer, Application, Job_interview_stage - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: job_id - schema: - type: string - description: If provided, wll only return interviews organized for this job. - examples: - JobId: - summary: job_id - - in: query - name: job_interview_stage_id - schema: - type: string - description: If provided, will only return interviews at this stage. - examples: - JobInterviewStageId: - summary: job_interview_stage_id - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: organizer_id - schema: - type: string - description: If provided, will only return interviews organized by this user. - examples: - OrganizerId: - summary: organizer_id - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - tags: - - interviews - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedScheduledInterviewList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: interviews_create - description: Creates a `ScheduledInterview` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - interviews - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ScheduledInterviewEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/ScheduledInterviewEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/ScheduledInterviewEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/ScheduledInterviewResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /ats/v1/interviews/{id}: - get: - operationId: interviews_retrieve - description: Returns a `ScheduledInterview` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - application - - interviewers - - job_interview_stage - - organizer - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandInterviewers,Organizer,Application,JobInterviewStage: - value: interviewers,organizer,application,job_interview_stage - summary: Expand Interviewers, Organizer, Application, Job_interview_stage - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - tags: - - interviews - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ScheduledInterview' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/interviews/meta/post: - get: - operationId: interviews_meta_post_retrieve - description: Returns metadata for `ScheduledInterview` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - interviews - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/issues: - get: - operationId: issues_list - description: Gets all issues for Organization. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: account_token - schema: - type: string - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_date - schema: - type: string - description: If included, will only include issues whose most recent action - occurred before this time - - in: query - name: end_user_organization_name - schema: - type: string - - in: query - name: first_incident_time_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose first incident time - was after this datetime. - - in: query - name: first_incident_time_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose first incident time - was before this datetime. - - in: query - name: include_muted - schema: - type: string - description: If true, will include muted issues - - in: query - name: integration_name - schema: - type: string - - in: query - name: last_incident_time_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose last incident time - was after this datetime. - - in: query - name: last_incident_time_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose last incident time - was before this datetime. - - in: query - name: linked_account_id - schema: - type: string - description: If provided, will only include issues pertaining to the linked - account passed in. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: start_date - schema: - type: string - description: If included, will only include issues whose most recent action - occurred after this time - - in: query - name: status - schema: - type: string - enum: - - ONGOING - - RESOLVED - description: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - tags: - - issues - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedIssueList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/issues/{id}: - get: - operationId: issues_retrieve - description: Get a specific issue. - parameters: - - in: path - name: id - schema: - type: string - format: uuid - required: true - tags: - - issues - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Issue' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/job-interview-stages: - get: - operationId: job_interview_stages_list - description: Returns a list of `JobInterviewStage` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - job - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandJob: - value: job - summary: Expand Job - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: job_id - schema: - type: string - description: If provided, will only return interview stages for this job. - examples: - JobId: - summary: job_id - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - job-interview-stages - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedJobInterviewStageList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/job-interview-stages/{id}: - get: - operationId: job_interview_stages_retrieve - description: Returns a `JobInterviewStage` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - job - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandJob: - value: job - summary: Expand Job - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - job-interview-stages - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/JobInterviewStage' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/job-postings: - get: - operationId: job_postings_list - description: Returns a list of `JobPosting` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - job - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandJob: - value: job - summary: Expand Job - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: status - schema: - type: string - nullable: true - enum: - - CLOSED - - DRAFT - - INTERNAL - - PENDING - - PUBLISHED - description: |- - If provided, will only return Job Postings with this status. Options: ('PUBLISHED', 'CLOSED', 'DRAFT', 'INTERNAL', 'PENDING') - - * `PUBLISHED` - PUBLISHED - * `CLOSED` - CLOSED - * `DRAFT` - DRAFT - * `INTERNAL` - INTERNAL - * `PENDING` - PENDING - tags: - - job-postings - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedJobPostingList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /ats/v1/job-postings/{id}: - get: - operationId: job_postings_retrieve - description: Returns a `JobPosting` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - job - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandJob: - value: job - summary: Expand Job - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - job-postings - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/JobPosting' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /ats/v1/jobs: - get: - operationId: jobs_list - description: Returns a list of `Job` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: code - schema: - type: string - nullable: true - description: If provided, will only return jobs with this code. - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - departments - - hiring_managers - - job_postings - - offices - - recruiters - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandDepartments,Offices,HiringManagers,JobPostings,Recruiters: - value: departments,offices,hiring_managers,job_postings,recruiters - summary: Expand Departments, Offices, Hiring_managers, Job_postings, Recruiters - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: offices - schema: - type: string - description: If provided, will only return jobs for this office; multiple - offices can be separated by commas. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: status - schema: - type: string - nullable: true - enum: - - ARCHIVED - - CLOSED - - DRAFT - - OPEN - - PENDING - description: |- - If provided, will only return jobs with this status. Options: ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING') - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - * `DRAFT` - DRAFT - * `ARCHIVED` - ARCHIVED - * `PENDING` - PENDING - tags: - - jobs - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedJobList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/jobs/{id}: - get: - operationId: jobs_retrieve - description: Returns a `Job` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - departments - - hiring_managers - - job_postings - - offices - - recruiters - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandDepartments,Offices,HiringManagers,JobPostings,Recruiters: - value: departments,offices,hiring_managers,job_postings,recruiters - summary: Expand Departments, Offices, Hiring_managers, Job_postings, Recruiters - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - tags: - - jobs - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Job' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/jobs/{job_id}/screening-questions: - get: - operationId: jobs_screening_questions_list - description: Returns a list of `ScreeningQuestion` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - job - - options - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandOptions,Job: - value: options,job - summary: Expand Options, Job - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: path - name: job_id - schema: - type: string - format: uuid - required: true - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - jobs - - screening-questions - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedScreeningQuestionList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /ats/v1/link-token: - post: - operationId: link_token_create - description: Creates a link token to be used when linking a new end user. - tags: - - link-token - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LinkToken' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/linked-account-scopes: - get: - operationId: linked_account_scopes_retrieve - description: Get all available permissions for Merge Common Models and fields - for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - scopes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: linked_account_scopes_create - description: Update permissions for any Common Model or field for a single Linked - Account. Any Scopes not set in this POST request will inherit the default - Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - scopes - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /ats/v1/linked-accounts: - get: - operationId: linked_accounts_list - description: List linked accounts for your organization. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: category - schema: - type: string - nullable: true - enum: - - accounting - - ats - - crm - - filestorage - - hris - - mktg - - ticketing - description: |- - Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` - - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_user_email_address - schema: - type: string - description: If provided, will only return linked accounts associated with - the given email address. - - in: query - name: end_user_organization_name - schema: - type: string - description: If provided, will only return linked accounts associated with - the given organization name. - - in: query - name: end_user_origin_id - schema: - type: string - description: If provided, will only return linked accounts associated with - the given origin ID. - - in: query - name: end_user_origin_ids - schema: - type: string - description: Comma-separated list of EndUser origin IDs, making it possible - to specify multiple EndUsers at once. - - in: query - name: id - schema: - type: string - format: uuid - - in: query - name: ids - schema: - type: string - description: Comma-separated list of LinkedAccount IDs, making it possible - to specify multiple LinkedAccounts at once. - - in: query - name: include_duplicates - schema: - type: boolean - description: If `true`, will include complete production duplicates of the - account specified by the `id` query parameter in the response. `id` must - be for a complete production linked account. - - in: query - name: integration_name - schema: - type: string - description: If provided, will only return linked accounts associated with - the given integration name. - - in: query - name: is_test_account - schema: - type: string - description: If included, will only include test linked accounts. If not included, - will only include non-test linked accounts. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: status - schema: - type: string - description: 'Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, - `RELINK_NEEDED`' - tags: - - linked-accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAccountDetailsAndActionsList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/offers: - get: - operationId: offers_list - description: Returns a list of `Offer` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: application_id - schema: - type: string - description: If provided, will only return offers for this application. - examples: - ApplicationId: - summary: application_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: creator_id - schema: - type: string - description: If provided, will only return offers created by this user. - examples: - CreatorId: - summary: creator_id - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - application - - creator - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandApplication,Creator: - value: application,creator - summary: Expand Application, Creator - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - tags: - - offers - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedOfferList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/offers/{id}: - get: - operationId: offers_retrieve - description: Returns an `Offer` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - application - - creator - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandApplication,Creator: - value: application,creator - summary: Expand Application, Creator - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - tags: - - offers - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Offer' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/offices: - get: - operationId: offices_list - description: Returns a list of `Office` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - offices - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedOfficeList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/offices/{id}: - get: - operationId: offices_retrieve - description: Returns an `Office` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - offices - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Office' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/passthrough: - post: - operationId: passthrough_create - description: Pull data from an endpoint not currently supported by Merge. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - passthrough - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/regenerate-key: - post: - operationId: regenerate_key_create - description: Exchange remote keys. - tags: - - regenerate-key - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKey' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/reject-reasons: - get: - operationId: reject_reasons_list - description: Returns a list of `RejectReason` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - reject-reasons - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRejectReasonList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/reject-reasons/{id}: - get: - operationId: reject_reasons_retrieve - description: Returns a `RejectReason` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - reject-reasons - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RejectReason' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/remote-fields: - get: - operationId: remote_fields_retrieve - description: Get all remote fields for a Linked Account. Remote fields are third-party - fields that are accessible after initial sync if remote_data is enabled. You - can use remote fields to override existing Merge fields or map a new Merge - field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: common_models - schema: - type: string - description: A comma seperated list of Common Model names. If included, will - only return Remote Fields for those Common Models. - - in: query - name: include_example_values - schema: - type: string - description: If true, will include example values, where available, for remote - fields in the 3rd party platform. These examples come from active data from - your customers. - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteFieldAPIResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/scorecards: - get: - operationId: scorecards_list - description: Returns a list of `Scorecard` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: application_id - schema: - type: string - description: If provided, will only return scorecards for this application. - examples: - ApplicationId: - summary: application_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - application - - interview - - interviewer - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandApplication,Interview,Interviewer: - value: application,interview,interviewer - summary: Expand Application, Interview, Interviewer - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: interview_id - schema: - type: string - description: If provided, will only return scorecards for this interview. - examples: - InterviewId: - summary: interview_id - - in: query - name: interviewer_id - schema: - type: string - description: If provided, will only return scorecards for this interviewer. - examples: - InterviewerId: - summary: interviewer_id - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - overall_recommendation - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesOverallRecommendation: - value: overall_recommendation - summary: Original Enum Values Overall_recommendation - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - overall_recommendation - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesOverallRecommendation: - value: overall_recommendation - summary: Original Enum Values Overall_recommendation - tags: - - scorecards - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedScorecardList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/scorecards/{id}: - get: - operationId: scorecards_retrieve - description: Returns a `Scorecard` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - application - - interview - - interviewer - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandApplication,Interview,Interviewer: - value: application,interview,interviewer - summary: Expand Application, Interview, Interviewer - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - overall_recommendation - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesOverallRecommendation: - value: overall_recommendation - summary: Original Enum Values Overall_recommendation - - in: query - name: show_enum_origins - schema: - type: string - enum: - - overall_recommendation - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesOverallRecommendation: - value: overall_recommendation - summary: Original Enum Values Overall_recommendation - tags: - - scorecards - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Scorecard' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/sync-status: - get: - operationId: sync_status_list - description: Get sync status for the current sync and the most recently finished - sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` - represents the most recent time any sync completed. These timestamps may correspond - to different sync instances which may result in a sync start time being later - than a separate sync completed time. To ensure you are retrieving the latest - available data reference the `last_sync_finished` timestamp where `last_sync_result` - is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, - `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about - sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - sync-status - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedSyncStatusList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/sync-status/resync: - post: - operationId: sync_status_resync_create - description: Force re-sync of all models. This endpoint is available for monthly, - quarterly, and highest sync frequency customers on the Professional or Enterprise - plans. Doing so will consume a sync credit for the relevant linked account. - Force re-syncs can also be triggered manually in the Merge Dashboard and is - available for all customers. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - force-resync - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SyncStatus' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/tags: - get: - operationId: tags_list - description: Returns a list of `Tag` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - tags - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedTagList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/target-fields: - get: - operationId: target_fields_retrieve - description: Get all organization-wide Target Fields, this will not include - any Linked Account specific Target Fields. Organization-wide Target Fields - are additional fields appended to the Merge Common Model for all Linked Accounts - in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ExternalTargetFieldAPIResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/users: - get: - operationId: users_list - description: Returns a list of `RemoteUser` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: email - schema: - type: string - format: email - nullable: true - description: If provided, will only return remote users with the given email - address - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - access_role - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesAccessRole: - value: access_role - summary: Original Enum Values Access_role - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - access_role - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesAccessRole: - value: access_role - summary: Original Enum Values Access_role - tags: - - users - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteUserList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/users/{id}: - get: - operationId: users_retrieve - description: Returns a `RemoteUser` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - access_role - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesAccessRole: - value: access_role - summary: Original Enum Values Access_role - - in: query - name: show_enum_origins - schema: - type: string - enum: - - access_role - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesAccessRole: - value: access_role - summary: Original Enum Values Access_role - tags: - - users - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteUser' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ats/v1/webhook-receivers: - get: - operationId: webhook_receivers_list - description: Returns a list of `WebhookReceiver` objects. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - webhook-receivers - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/WebhookReceiver' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: webhook_receivers_create - description: Creates a `WebhookReceiver` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - webhook-receivers - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookReceiver' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC -components: - schemas: - AccessRoleEnum: - enum: - - SUPER_ADMIN - - ADMIN - - TEAM_MEMBER - - LIMITED_TEAM_MEMBER - - INTERVIEWER - type: string - description: |- - * `SUPER_ADMIN` - SUPER_ADMIN - * `ADMIN` - ADMIN - * `TEAM_MEMBER` - TEAM_MEMBER - * `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER - * `INTERVIEWER` - INTERVIEWER - x-merge-category: ats - AccountDetails: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - integration: - type: string - readOnly: true - example: BambooHR - integration_slug: - type: string - readOnly: true - example: bamboohr - category: - oneOf: - - $ref: '#/components/schemas/CategoryEnum' - - type: string - nullable: true - example: hris - end_user_origin_id: - type: string - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - end_user_organization_name: - type: string - readOnly: true - example: Waystar Royco - end_user_email_address: - type: string - format: email - readOnly: true - example: kendall.roy@waystar-royco.com - status: - type: string - readOnly: true - example: COMPLETE - webhook_listener_url: - type: string - format: uri - readOnly: true - example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: - type: boolean - nullable: true - readOnly: true - description: Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test Linked - Accounts, incomplete Production Linked Accounts, and ignored duplicate - Production Linked Account sets. - example: true - account_type: - type: string - readOnly: true - example: PRODUCTION - completed_at: - type: string - format: date-time - nullable: true - description: The time at which account completes the linking flow. - example: '2024-08-26T20:11:19.277118Z' - x-merge-category: ats - AccountDetailsAndActions: - type: object - description: |- - # The LinkedAccount Object - ### Description - The `LinkedAccount` object is used to represent an end user's link with a specific integration. - - ### Usage Example - View a list of your organization's `LinkedAccount` objects. - properties: - id: - type: string - example: e59b1821-f85c-4e28-a6b3-1804156f3563 - category: - oneOf: - - $ref: '#/components/schemas/CategoryEnum' - - type: string - example: hris - status: - oneOf: - - $ref: '#/components/schemas/AccountDetailsAndActionsStatusEnum' - - type: string - example: INCOMPLETE - status_detail: - type: string - example: Invalid login credentials - end_user_origin_id: - type: string - example: 3ac95cde-6c7f-4eef-afec-be710b42308d - end_user_organization_name: - type: string - example: Foo Bar, LLC - end_user_email_address: - type: string - example: hradmin@foobar.dev - subdomain: - type: string - description: The tenant or domain the customer has provided access to. - example: foobar - webhook_listener_url: - type: string - example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: - type: boolean - nullable: true - description: Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test Linked - Accounts, incomplete Production Linked Accounts, and ignored duplicate - Production Linked Account sets. - example: true - integration: - $ref: '#/components/schemas/AccountDetailsAndActionsIntegration' - example: - name: SAP SuccessFactors - categories: - - hris - - ats - image: https://cdn.merge.dev/SuccessFactors_Logo.png - square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg - color: '#F6A704' - slug: sap-successfactors - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - account_type: - type: string - example: PRODUCTION - completed_at: - type: string - format: date-time - example: '2024-08-26T20:11:19.277118Z' - required: - - account_type - - completed_at - - end_user_email_address - - end_user_organization_name - - id - - status - - webhook_listener_url - x-merge-sample-json: '{"id": "e59b1821-f85c-4e28-a6b3-1804156f3563", "category": - "hris", "status": "INCOMPLETE", "status_detail": "Invalid login credentials", - "end_user_origin_id": "3ac95cde-6c7f-4eef-afec-be710b42308d", "end_user_organization_name": - "Foo Bar, LLC", "end_user_email_address": "hradmin@foobar.dev", "webhook_listener_url": - "https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4", - "is_duplicate": true, "integration": {"name": "SAP SuccessFactors", "categories": - ["hris", "ats"], "image": "https://cdn.merge.dev/SuccessFactors_Logo.png", - "square_image": "https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg", "color": - "#F6A704", "slug": "sap-successfactors", "passthrough_available": true, "available_model_operations": - [{"model_name": "Candidate", "available_operations": ["FETCH", "CREATE"], - "required_post_parameters": ["remote_user_id"], "supported_fields": ["first_name", - "last_name", "company", "title"]}]}}' - x-merge-category: ats - AccountDetailsAndActionsIntegration: - type: object - properties: - name: - type: string - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - image: - type: string - square_image: - type: string - color: - type: string - slug: - type: string - passthrough_available: - type: boolean - available_model_operations: - type: array - items: - $ref: '#/components/schemas/ModelOperation' - required: - - categories - - color - - name - - passthrough_available - - slug - x-merge-category: ats - AccountDetailsAndActionsStatusEnum: - enum: - - COMPLETE - - INCOMPLETE - - RELINK_NEEDED - - IDLE - type: string - description: |- - * `COMPLETE` - COMPLETE - * `INCOMPLETE` - INCOMPLETE - * `RELINK_NEEDED` - RELINK_NEEDED - * `IDLE` - IDLE - x-merge-category: ats - AccountIntegration: - type: object - properties: - name: - type: string - description: Company name. - abbreviated_name: - type: string - nullable: true - description: "Optional. This shortened name appears in places with limited - space, usually in conjunction with the platform's logo (e.g., Merge Link - menu).

Example: Workforce Now (in lieu of ADP Workforce Now), - SuccessFactors (in lieu of SAP SuccessFactors)" - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - description: Category or categories this integration belongs to. Multiple - categories should be comma separated, i.e. [ats, hris]. - readOnly: true - image: - type: string - format: uri - nullable: true - description: Company logo in rectangular shape. - square_image: - type: string - format: uri - nullable: true - description: Company logo in square shape. - color: - type: string - description: The color of this integration used for buttons and text throughout - the app and landing pages. Choose a darker, saturated color. - pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ - maxLength: 18 - slug: - type: string - readOnly: true - api_endpoints_to_documentation_urls: - type: object - additionalProperties: {} - description: "Mapping of API endpoints to documentation urls for support. - Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', - 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], - 'POST': []}" - webhook_setup_guide_url: - type: string - nullable: true - description: Setup guide URL for third party webhook creation. Exposed in - Merge Docs. - category_beta_status: - type: object - description: Category or categories this integration is in beta status for. - readOnly: true - required: - - name - x-merge-category: ats - AccountToken: - type: object - properties: - account_token: - type: string - example: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB - integration: - $ref: '#/components/schemas/AccountIntegration' - example: - name: SAP SuccessFactors - categories: - - hris - - ats - image: https://cdn.merge.dev/SuccessFactors_Logo.png - square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg - color: '#F6A704' - slug: sap-successfactors - id: - type: string - example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - required: - - account_token - - id - - integration - x-merge-category: ats - Activity: - type: object - description: |- - # The Activity Object - ### Description - The `Activity` object is used to represent an activity for a candidate performed by a user. - ### Usage Example - Fetch from the `LIST Activities` endpoint and filter by `ID` to show all activities. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '198123' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - user: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/RemoteUser' - nullable: true - description: The user that performed the action. - example: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - x-merge-expands-to: RemoteUser - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's activity was created. - example: '2021-10-15T00:00:00Z' - activity_type: - oneOf: - - $ref: '#/components/schemas/ActivityTypeEnum' - - type: string - nullable: true - description: |- - The activity's type. - - * `NOTE` - NOTE - * `EMAIL` - EMAIL - * `OTHER` - OTHER - example: NOTE - subject: - type: string - nullable: true - description: The activity's subject. - example: Gil Feig's interview - body: - type: string - nullable: true - description: The activity's body. - example: Candidate loves integrations! - visibility: - oneOf: - - $ref: '#/components/schemas/VisibilityEnum' - - type: string - nullable: true - description: |- - The activity's visibility. - - * `ADMIN_ONLY` - ADMIN_ONLY - * `PUBLIC` - PUBLIC - * `PRIVATE` - PRIVATE - example: PRIVATE - candidate: - type: string - format: uuid - nullable: true - example: 550e8400-e29b-41d4-a716-446655440000 - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - x-merge-expands: '{"user": "RemoteUser"}' - x-merge-category: ats - ActivityEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/ActivityRequest' - remote_user_id: - type: string - required: - - model - - remote_user_id - x-merge-category: ats - ActivityRequest: - type: object - description: |- - # The Activity Object - ### Description - The `Activity` object is used to represent an activity for a candidate performed by a user. - ### Usage Example - Fetch from the `LIST Activities` endpoint and filter by `ID` to show all activities. - properties: - user: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/RemoteUser' - nullable: true - description: The user that performed the action. - example: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - x-merge-expands-to: RemoteUser - activity_type: - nullable: true - description: |- - The activity's type. - - * `NOTE` - NOTE - * `EMAIL` - EMAIL - * `OTHER` - OTHER - example: NOTE - $ref: '#/components/schemas/ActivityTypeEnum' - subject: - type: string - nullable: true - description: The activity's subject. - example: Gil Feig's interview - body: - type: string - nullable: true - description: The activity's body. - example: Candidate loves integrations! - visibility: - oneOf: - - $ref: '#/components/schemas/VisibilityEnum' - - type: string - nullable: true - description: |- - The activity's visibility. - - * `ADMIN_ONLY` - ADMIN_ONLY - * `PUBLIC` - PUBLIC - * `PRIVATE` - PRIVATE - example: PRIVATE - candidate: - type: string - format: uuid - nullable: true - example: 550e8400-e29b-41d4-a716-446655440000 - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"user": "RemoteUser"}' - x-merge-category: ats - ActivityResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Activity' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: ats - ActivityTypeEnum: - enum: - - NOTE - - EMAIL - - OTHER - type: string - description: |- - * `NOTE` - NOTE - * `EMAIL` - EMAIL - * `OTHER` - OTHER - x-merge-category: ats - AdvancedMetadata: - type: object - properties: - id: - type: string - format: uuid - display_name: - type: string - description: - type: string - is_required: - type: boolean - is_custom: - type: boolean - field_choices: - type: array - items: {} - required: - - id - x-merge-category: ats - Application: - type: object - description: |- - # The Application Object - ### Description - The Application Object is used to represent a candidate's journey through a particular Job's recruiting process. If a Candidate applies for multiple Jobs, there will be a separate Application for each Job if the third-party integration allows it. - - ### Usage Example - Fetch from the `LIST Applications` endpoint and filter by `ID` to show all applications. - properties: - id: - type: string - format: uuid - readOnly: true - example: 92e8a369-fffe-430d-b93a-f7e8a16563f1 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '98796' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - candidate: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Candidate' - nullable: true - description: The candidate applying. - example: 2872ba14-4084-492b-be96-e5eee6fc33ef - x-merge-expands-to: Candidate - job: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Job' - nullable: true - description: The job being applied for. - example: 52bf9b5e-0beb-4f6f-8a72-cd4dca7ca633 - x-merge-expands-to: Job - applied_at: - type: string - format: date-time - nullable: true - description: When the application was submitted. - example: '2021-10-15T00:00:00Z' - rejected_at: - type: string - format: date-time - nullable: true - description: When the application was rejected. - example: '2021-11-15T00:00:00Z' - offers: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Offer' - nullable: true - example: - - e9b5c11d-c588-468e-8567-cd6992e42b62 - x-merge-expands-to: Offer - source: - type: string - nullable: true - description: The application's source. - example: Campus recruiting event - credited_to: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/RemoteUser' - nullable: true - description: The user credited for this application. - example: 58166795-8d68-4b30-9bfb-bfd402479484 - x-merge-expands-to: RemoteUser - screening_question_answers: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/ScreeningQuestionAnswer' - example: - - question: 0238cbc6-6040-430a-848e-aaiehfhdbadf4ae - answer: 5+ years experience - - question: 59982bf6-7c54-4ff8-ab60-ced0bb644b84 - answer: New york city - x-merge-expands-to: ScreeningQuestionAnswer - current_stage: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/JobInterviewStage' - nullable: true - description: The application's current stage. - example: d578dfdc-7b0a-4ab6-a2b0-4b40f20eb9ea - x-merge-expands-to: JobInterviewStage - reject_reason: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/RejectReason' - nullable: true - description: The application's reason for rejection. - example: 59b25f2b-da02-40f5-9656-9fa0db555784 - x-merge-expands-to: RejectReason - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /candidacies - data: - - Varies by platform - x-merge-nested-write-allowed: true - x-merge-expands: '{"candidate": "Candidate", "credited_to": "RemoteUser", "current_stage": - "JobInterviewStage", "job": "Job", "offers": "Offer", "reject_reason": "RejectReason", - "screening_question_answers": "ScreeningQuestionAnswer", "screening_question_answers.question": - "ScreeningQuestion"}' - x-merge-category: ats - ApplicationEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/ApplicationRequest' - remote_user_id: - type: string - required: - - model - - remote_user_id - x-merge-category: ats - ApplicationRequest: - type: object - description: |- - # The Application Object - ### Description - The Application Object is used to represent a candidate's journey through a particular Job's recruiting process. If a Candidate applies for multiple Jobs, there will be a separate Application for each Job if the third-party integration allows it. - - ### Usage Example - Fetch from the `LIST Applications` endpoint and filter by `ID` to show all applications. - properties: - candidate: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Candidate' - nullable: true - description: The candidate applying. - example: 2872ba14-4084-492b-be96-e5eee6fc33ef - x-merge-expands-to: Candidate - job: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Job' - nullable: true - description: The job being applied for. - example: 52bf9b5e-0beb-4f6f-8a72-cd4dca7ca633 - x-merge-expands-to: Job - applied_at: - type: string - format: date-time - nullable: true - description: When the application was submitted. - example: '2021-10-15T00:00:00Z' - rejected_at: - type: string - format: date-time - nullable: true - description: When the application was rejected. - example: '2021-11-15T00:00:00Z' - offers: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Offer' - nullable: true - example: - - e9b5c11d-c588-468e-8567-cd6992e42b62 - x-merge-expands-to: Offer - source: - type: string - nullable: true - description: The application's source. - example: Campus recruiting event - credited_to: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/RemoteUser' - nullable: true - description: The user credited for this application. - example: 58166795-8d68-4b30-9bfb-bfd402479484 - x-merge-expands-to: RemoteUser - screening_question_answers: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/ScreeningQuestionAnswerRequest' - example: - - question: 0238cbc6-6040-430a-848e-aaiehfhdbadf4ae - answer: 5+ years experience - - question: 59982bf6-7c54-4ff8-ab60-ced0bb644b84 - answer: New york city - x-merge-expands-to: ScreeningQuestionAnswer - current_stage: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/JobInterviewStage' - nullable: true - description: The application's current stage. - example: d578dfdc-7b0a-4ab6-a2b0-4b40f20eb9ea - x-merge-expands-to: JobInterviewStage - reject_reason: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/RejectReason' - nullable: true - description: The application's reason for rejection. - example: 59b25f2b-da02-40f5-9656-9fa0db555784 - x-merge-expands-to: RejectReason - remote_template_id: - type: string - writeOnly: true - nullable: true - minLength: 1 - example: '92830948203' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"candidate": "Candidate", "credited_to": "RemoteUser", "current_stage": - "JobInterviewStage", "job": "Job", "offers": "Offer", "reject_reason": "RejectReason", - "screening_question_answers": "ScreeningQuestionAnswer", "screening_question_answers.question": - "ScreeningQuestion"}' - x-merge-category: ats - ApplicationResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Application' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: ats - AsyncPassthroughReciept: - type: object - properties: - async_passthrough_receipt_id: - type: string - format: uuid - example: fd29020f-2695-445e-922e-dcd5e81903fd - required: - - async_passthrough_receipt_id - x-merge-category: ats - Attachment: - type: object - description: |- - # The Attachment Object - ### Description - The `Attachment` object is used to represent a file attached to a candidate. - ### Usage Example - Fetch from the `LIST Attachments` endpoint and view attachments accessible by a company. - properties: - id: - type: string - format: uuid - readOnly: true - example: c640b80b-fac9-409f-aa19-1f9221aec445 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '11167' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - file_name: - type: string - nullable: true - description: The attachment's name. - example: Candidate Resume - file_url: - type: string - format: uri - nullable: true - maxLength: 2000 - example: http://alturl.com/p749b - description: The attachment's url. - candidate: - type: string - format: uuid - nullable: true - description: '' - example: 2872ba14-4084-492b-be96-e5eee6fc33ef - attachment_type: - oneOf: - - $ref: '#/components/schemas/AttachmentTypeEnum' - - type: string - nullable: true - description: |- - The attachment's type. - - * `RESUME` - RESUME - * `COVER_LETTER` - COVER_LETTER - * `OFFER_LETTER` - OFFER_LETTER - * `OTHER` - OTHER - example: RESUME - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /attachments - data: - - Varies by platform - x-merge-nested-write-allowed: true - x-merge-expands: '{"ticket": "Ticket"}' - x-merge-category: ats - AttachmentEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/AttachmentRequest' - remote_user_id: - type: string - required: - - model - - remote_user_id - x-merge-category: ats - AttachmentRequest: - type: object - description: |- - # The Attachment Object - ### Description - The `Attachment` object is used to represent a file attached to a candidate. - ### Usage Example - Fetch from the `LIST Attachments` endpoint and view attachments accessible by a company. - properties: - file_name: - type: string - nullable: true - description: The attachment's name. - example: Candidate Resume - file_url: - type: string - format: uri - nullable: true - maxLength: 2000 - example: http://alturl.com/p749b - description: The attachment's url. - candidate: - type: string - format: uuid - nullable: true - description: '' - example: 2872ba14-4084-492b-be96-e5eee6fc33ef - attachment_type: - oneOf: - - $ref: '#/components/schemas/AttachmentTypeEnum' - - type: string - nullable: true - description: |- - The attachment's type. - - * `RESUME` - RESUME - * `COVER_LETTER` - COVER_LETTER - * `OFFER_LETTER` - OFFER_LETTER - * `OTHER` - OTHER - example: RESUME - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"ticket": "Ticket"}' - x-merge-category: ats - AttachmentResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Attachment' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: ats - AttachmentTypeEnum: - enum: - - RESUME - - COVER_LETTER - - OFFER_LETTER - - OTHER - type: string - description: |- - * `RESUME` - RESUME - * `COVER_LETTER` - COVER_LETTER - * `OFFER_LETTER` - OFFER_LETTER - * `OTHER` - OTHER - x-merge-category: ats - AuditLogEvent: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: b5ceea2a-7171-47ce-8090-165cfce5572c - user_name: - type: string - nullable: true - description: The User's full name at the time of this Event occurring. - maxLength: 200 - example: Gil Feig - user_email: - type: string - format: email - nullable: true - description: The User's email at the time of this Event occurring. - maxLength: 254 - example: hello@merge.dev - role: - oneOf: - - $ref: '#/components/schemas/RoleEnum' - - type: string - description: |- - Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. - - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - example: ADMIN - ip_address: - type: string - maxLength: 45 - example: 192.0.2.123 - event_type: - oneOf: - - $ref: '#/components/schemas/EventTypeEnum' - - type: string - description: |- - Designates the type of event that occurred. - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - * `INVITED_USER` - INVITED_USER - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - * `CREATED_DESTINATION` - CREATED_DESTINATION - * `DELETED_DESTINATION` - DELETED_DESTINATION - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - * `CHANGED_SCOPES` - CHANGED_SCOPES - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - * `RESET_PASSWORD` - RESET_PASSWORD - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - * `MUTED_ISSUE` - MUTED_ISSUE - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - example: CHANGED_SCOPES - event_description: - type: string - example: Organization-wide Scopes for model hris.Employee updated from Read - to Read+Write - created_at: - type: string - format: date-time - readOnly: true - required: - - event_description - - event_type - - ip_address - - role - x-merge-category: ats - AvailableActions: - type: object - description: |- - # The AvailableActions Object - ### Description - The `Activity` object is used to see all available model/operation combinations for an integration. - - ### Usage Example - Fetch all the actions available for the `Zenefits` integration. - properties: - integration: - $ref: '#/components/schemas/AccountIntegration' - example: - name: Lever - categories: - - ats - image: https://merge-api-production.s3.amazonaws.com/media/Lever_Logo.png - square_image: https://merge-api-production.s3.amazonaws.com/media/Lever_Square_Logo.png - color: '#262A34' - is_in_beta: 'true' - api_endpoints_to_documentation_urls: "{'GET': [('/common-model-scopes', - 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve')], - 'POST': []}" - passthrough_available: - type: boolean - example: true - available_model_operations: - type: array - items: - $ref: '#/components/schemas/ModelOperation' - example: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - required: - - integration - - passthrough_available - x-merge-category: ats - Candidate: - type: object - description: |- - # The Candidate Object - ### Description - The `Candidate` object is used to represent profile information about a given Candidate. Because it is specific to a Candidate, this information stays constant across applications. - ### Usage Example - Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates. - properties: - id: - type: string - format: uuid - readOnly: true - example: 521b18c2-4d01-4297-b451-19858d07c133 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '21198' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - first_name: - type: string - nullable: true - description: The candidate's first name. - example: Gil - last_name: - type: string - nullable: true - description: The candidate's last name. - example: Feig - company: - type: string - nullable: true - description: The candidate's current company. - example: Columbia Dining App. - title: - type: string - nullable: true - description: The candidate's current title. - example: Software Engineer - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's candidate was created. - example: '2021-10-15T00:00:00Z' - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's candidate was updated. - example: '2021-10-16T00:00:00Z' - last_interaction_at: - type: string - format: date-time - nullable: true - description: When the most recent interaction with the candidate occurred. - example: '2021-10-17T00:00:00Z' - is_private: - type: boolean - nullable: true - description: Whether or not the candidate is private. - example: true - can_email: - type: boolean - nullable: true - description: Whether or not the candidate can be emailed. - example: true - locations: - type: array - items: - type: string - nullable: true - description: The candidate's locations. - nullable: true - description: The candidate's locations. - example: - - San Francisco - - New York - - Miami - phone_numbers: - type: array - items: - $ref: '#/components/schemas/PhoneNumber' - example: - - value: '+1234567890' - phone_number_type: MOBILE - email_addresses: - type: array - items: - $ref: '#/components/schemas/EmailAddress' - example: - - value: hello@merge.dev - email_address_type: PERSONAL - urls: - type: array - items: - $ref: '#/components/schemas/Url' - example: - - value: http://alturl.com/p749b - url_type: BLOG - tags: - type: array - items: - type: string - nullable: true - description: The tag's name. - example: - - High-Priority - description: Array of `Tag` names as strings. - applications: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Application' - nullable: true - example: - - 29eb9867-ce2a-403f-b8ce-f2844b89f078 - - b4d08e5c-de00-4d64-a29f-66addac9af99 - - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 - description: Array of `Application` object IDs. - x-merge-expands-to: Application - attachments: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Attachment' - nullable: true - example: - - bea08964-32b4-4a20-8bb4-2612ba09de1d - description: Array of `Attachment` object IDs. - x-merge-expands-to: Attachment - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /candidates - data: - - Varies by platform - x-merge-nested-write-allowed: true - x-merge-expands: '{"applications": "Application", "attachments": "Attachment"}' - x-merge-category: ats - CandidateEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/CandidateRequest' - remote_user_id: - type: string - required: - - model - - remote_user_id - x-merge-category: ats - CandidateRequest: - type: object - description: |- - # The Candidate Object - ### Description - The `Candidate` object is used to represent profile information about a given Candidate. Because it is specific to a Candidate, this information stays constant across applications. - ### Usage Example - Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates. - properties: - first_name: - type: string - nullable: true - description: The candidate's first name. - example: Gil - last_name: - type: string - nullable: true - description: The candidate's last name. - example: Feig - company: - type: string - nullable: true - description: The candidate's current company. - example: Columbia Dining App. - title: - type: string - nullable: true - description: The candidate's current title. - example: Software Engineer - last_interaction_at: - type: string - format: date-time - nullable: true - description: When the most recent interaction with the candidate occurred. - example: '2021-10-17T00:00:00Z' - is_private: - type: boolean - nullable: true - description: Whether or not the candidate is private. - example: true - can_email: - type: boolean - nullable: true - description: Whether or not the candidate can be emailed. - example: true - locations: - type: array - items: - type: string - nullable: true - description: The candidate's locations. - nullable: true - description: The candidate's locations. - example: - - San Francisco - - New York - - Miami - phone_numbers: - type: array - items: - $ref: '#/components/schemas/PhoneNumberRequest' - example: - - value: '+1234567890' - phone_number_type: MOBILE - email_addresses: - type: array - items: - $ref: '#/components/schemas/EmailAddressRequest' - example: - - value: hello@merge.dev - email_address_type: PERSONAL - urls: - type: array - items: - $ref: '#/components/schemas/UrlRequest' - example: - - value: http://alturl.com/p749b - url_type: BLOG - tags: - type: array - items: - type: string - nullable: true - description: The tag's name. - example: - - High-Priority - description: Array of `Tag` names as strings. - applications: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Application' - nullable: true - example: - - 29eb9867-ce2a-403f-b8ce-f2844b89f078 - - b4d08e5c-de00-4d64-a29f-66addac9af99 - - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 - description: Array of `Application` object IDs. - x-merge-expands-to: Application - attachments: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Attachment' - nullable: true - example: - - bea08964-32b4-4a20-8bb4-2612ba09de1d - description: Array of `Attachment` object IDs. - x-merge-expands-to: Attachment - remote_template_id: - type: string - writeOnly: true - nullable: true - minLength: 1 - example: '92830948203' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"applications": "Application", "attachments": "Attachment"}' - x-merge-category: ats - CandidateResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Candidate' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: ats - CategoriesEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - type: string - description: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - x-merge-category: ats - CategoryEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - type: string - description: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - x-merge-category: ats - CommonModelScopeAPI: - type: object - properties: - common_models: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializer' - description: The common models you want to update the scopes for - example: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - required: - - common_models - x-merge-category: ats - CommonModelScopesBodyRequest: - type: object - properties: - model_id: - type: string - minLength: 1 - example: hris.Employee - enabled_actions: - type: array - items: - $ref: '#/components/schemas/EnabledActionsEnum' - example: - - READ - - WRITE - disabled_fields: - type: array - items: - type: string - minLength: 1 - example: - - first_name - required: - - disabled_fields - - enabled_actions - - model_id - x-merge-category: ats - CreateFieldMappingRequest: - type: object - properties: - target_field_name: - type: string - minLength: 1 - description: The name of the target field you want this remote field to - map to. - example: example_target_field_name - target_field_description: - type: string - minLength: 1 - description: The description of the target field you want this remote field - to map to. - example: this is a example description of the target field - remote_field_traversal_path: - type: array - items: {} - description: The field traversal path of the remote field listed when you - hit the GET /remote-fields endpoint. - example: - - example_remote_field - remote_method: - type: string - minLength: 1 - description: The method of the remote endpoint where the remote field is - coming from. - example: GET - remote_url_path: - type: string - minLength: 1 - description: The path of the remote endpoint where the remote field is coming - from. - example: /example-url-path - common_model_name: - type: string - minLength: 1 - description: The name of the Common Model that the remote field corresponds - to in a given category. - example: ExampleCommonModel - required: - - common_model_name - - remote_field_traversal_path - - remote_method - - remote_url_path - - target_field_description - - target_field_name - x-merge-category: ats - DataPassthroughRequest: - type: object - description: |- - # The DataPassthrough Object - ### Description - The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. - - ### Usage Example - Create a `DataPassthrough` to get team hierarchies from your Rippling integration. - properties: - method: - allOf: - - $ref: '#/components/schemas/MethodEnum' - example: POST - path: - type: string - minLength: 1 - description: The path of the request in the third party's platform. - example: /scooters - base_url_override: - type: string - nullable: true - minLength: 1 - description: An optional override of the third party's base url for the - request. - example: https://api.example.com - data: - type: string - nullable: true - minLength: 1 - description: The data with the request. You must include a `request_format` - parameter matching the data's format - example: '{"company": "Lime", "model": "Gen 2.5"}' - multipart_form_data: - type: array - items: - $ref: '#/components/schemas/MultipartFormFieldRequest' - nullable: true - description: Pass an array of `MultipartFormField` objects in here instead - of using the `data` param if `request_format` is set to `MULTIPART`. - headers: - type: object - additionalProperties: {} - nullable: true - description: The headers to use for the request (Merge will handle the account's - authorization headers). `Content-Type` header is required for passthrough. - Choose content type corresponding to expected format of receiving server. - example: - EXTRA-HEADER: value - request_format: - allOf: - - $ref: '#/components/schemas/RequestFormatEnum' - nullable: true - example: JSON - normalize_response: - type: boolean - description: 'Optional. If true, the response will always be an object of - the form `{"type": T, "value": ...}` where `T` will be one of `string, - boolean, number, null, array, object`.' - required: - - method - - path - x-merge-category: ats - DebugModeLog: - type: object - properties: - log_id: - type: string - example: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: - type: string - example: https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - $ref: '#/components/schemas/DebugModelLogSummary' - example: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - required: - - dashboard_view - - log_id - - log_summary - x-merge-sample-json: '{"log_id": "99433219-8017-4acd-bb3c-ceb23d663832", "dashboard_view": - "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832", "log_summary": - {"url": "www.exampleintegration.com/api/v1/exampleapi", "method": "POST", - "status_code": 200}}' - x-merge-category: ats - DebugModelLogSummary: - type: object - properties: - url: - type: string - example: www.exampleintegration.com/api/v1/exampleapi - method: - type: string - example: POST - status_code: - type: integer - example: 200 - required: - - method - - status_code - - url - x-merge-sample-json: '{"url": "www.exampleintegration.com/api/v1/exampleapi", - "method": "POST", "status_code": 200}' - x-merge-category: ats - Department: - type: object - description: |- - # The Department Object - ### Description - The `Department` object is used to represent a department within a company. - ### Usage Example - Fetch from the `LIST Departments` endpoint and view the departments within a company. - properties: - id: - type: string - format: uuid - readOnly: true - example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '23456' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The department's name. - example: Engineering - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /departments - data: - - Varies by platform - x-merge-category: ats - DisabilityStatusEnum: - enum: - - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY - - NO_I_DONT_HAVE_A_DISABILITY - - I_DONT_WISH_TO_ANSWER - type: string - description: |- - * `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY - * `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY - * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER - x-merge-category: ats - EEOC: - type: object - description: |- - # The EEOC Object - ### Description - The `EEOC` object is used to represent the Equal Employment Opportunity Commission information for a candidate (race, gender, veteran status, disability status). - ### Usage Example - Fetch from the `LIST EEOCs` endpoint and filter by `candidate` to show all EEOC information for a candidate. - properties: - id: - type: string - format: uuid - readOnly: true - example: f7dd7b4f-237e-4772-8bd4-3246384c6c58 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '76' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - candidate: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Candidate' - nullable: true - description: The candidate being represented. - example: f963f34d-3d2f-4f77-b557-cf36bc7e6498 - x-merge-expands-to: Candidate - submitted_at: - type: string - format: date-time - nullable: true - description: When the information was submitted. - example: '2021-10-15T00:00:00Z' - race: - oneOf: - - $ref: '#/components/schemas/RaceEnum' - - type: string - nullable: true - description: |- - The candidate's race. - - * `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - AMERICAN_INDIAN_OR_ALASKAN_NATIVE - * `ASIAN` - ASIAN - * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN - * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO - * `WHITE` - WHITE - * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES - * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY - example: HISPANIC_OR_LATINO - gender: - oneOf: - - $ref: '#/components/schemas/GenderEnum' - - type: string - nullable: true - description: |- - The candidate's gender. - - * `MALE` - MALE - * `FEMALE` - FEMALE - * `NON-BINARY` - NON-BINARY - * `OTHER` - OTHER - * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY - example: FEMALE - veteran_status: - oneOf: - - $ref: '#/components/schemas/VeteranStatusEnum' - - type: string - nullable: true - description: |- - The candidate's veteran status. - - * `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN - * `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN - * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER - example: I_AM_NOT_A_PROTECTED_VETERAN - disability_status: - oneOf: - - $ref: '#/components/schemas/DisabilityStatusEnum' - - type: string - nullable: true - description: |- - The candidate's disability status. - - * `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY - * `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY - * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER - example: I_DONT_WISH_TO_ANSWER - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /eeoc - data: - - Varies by platform - x-merge-expands: '{"candidate": "Candidate"}' - x-merge-category: ats - EmailAddress: - type: object - description: |- - # The EmailAddress Object - ### Description - The `EmailAddress` object is used to represent a candidate's email address. - ### Usage Example - Fetch from the `GET Candidate` endpoint and view their email addresses. - properties: - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - value: - type: string - format: email - nullable: true - description: The email address. - maxLength: 254 - example: merge_is_hiring@merge.dev - email_address_type: - oneOf: - - $ref: '#/components/schemas/EmailAddressTypeEnum' - - type: string - nullable: true - description: |- - The type of email address. - - * `PERSONAL` - PERSONAL - * `WORK` - WORK - * `OTHER` - OTHER - example: PERSONAL - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - x-merge-nested-write-allowed: true - x-merge-category: ats - EmailAddressRequest: - type: object - description: |- - # The EmailAddress Object - ### Description - The `EmailAddress` object is used to represent a candidate's email address. - ### Usage Example - Fetch from the `GET Candidate` endpoint and view their email addresses. - properties: - value: - type: string - format: email - nullable: true - description: The email address. - maxLength: 254 - example: merge_is_hiring@merge.dev - email_address_type: - oneOf: - - $ref: '#/components/schemas/EmailAddressTypeEnum' - - type: string - nullable: true - description: |- - The type of email address. - - * `PERSONAL` - PERSONAL - * `WORK` - WORK - * `OTHER` - OTHER - example: PERSONAL - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-category: ats - EmailAddressTypeEnum: - enum: - - PERSONAL - - WORK - - OTHER - type: string - description: |- - * `PERSONAL` - PERSONAL - * `WORK` - WORK - * `OTHER` - OTHER - x-merge-category: ats - EnabledActionsEnum: - enum: - - READ - - WRITE - type: string - description: |- - * `READ` - READ - * `WRITE` - WRITE - x-merge-category: ats - EncodingEnum: - enum: - - RAW - - BASE64 - - GZIP_BASE64 - type: string - description: |- - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - x-merge-category: ats - EndUserDetailsRequest: - type: object - properties: - end_user_email_address: - type: string - minLength: 1 - description: Your end user's email address. This is purely for identification - purposes - setting this value will not cause any emails to be sent. - maxLength: 100 - example: example@gmail.com - end_user_organization_name: - type: string - minLength: 1 - description: Your end user's organization. - maxLength: 100 - example: Test Organization - end_user_origin_id: - type: string - minLength: 1 - description: This unique identifier typically represents the ID for your - end user in your product's database. This value must be distinct from - other Linked Accounts' unique identifiers. - maxLength: 100 - example: '12345' - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - description: The integration categories to show in Merge Link. - example: - - hris - - ats - integration: - type: string - nullable: true - minLength: 1 - description: The slug of a specific pre-selected integration for this linking - flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. - example: bamboohr - link_expiry_mins: - type: integer - maximum: 10080 - minimum: 30 - default: 30 - description: An integer number of minutes between [30, 720 or 10080 if for - a Magic Link URL] for how long this token is valid. Defaults to 30. - should_create_magic_link_url: - type: boolean - nullable: true - default: false - description: Whether to generate a Magic Link URL. Defaults to false. For - more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - hide_admin_magic_link: - type: boolean - nullable: true - default: false - description: Whether to generate a Magic Link URL on the Admin Needed screen - during the linking flow. Defaults to false. For more information on Magic - Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - common_models: - type: array - items: - $ref: '#/components/schemas/CommonModelScopesBodyRequest' - nullable: true - description: An array of objects to specify the models and fields that will - be disabled for a given Linked Account. Each object uses model_id, enabled_actions, - and disabled_fields to specify the model, method, and fields that are - scoped for a given Linked Account. - category_common_model_scopes: - type: object - additionalProperties: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' - nullable: true - description: When creating a Link Token, you can set permissions for Common - Models that will apply to the account that is going to be linked. Any - model or field not specified in link token payload will default to existing - settings. - example: - hris: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - field_permissions: - enabled_fields: - - first_name - - last_name - - personal_email - disabled_fields: - - preferred_name - - model_name: Employment - model_permissions: - READ: - is_enabled: false - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - effective_date - ats: - - model_name: Job - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - field_permissions: - enabled_fields: - - name - disabled_fields: - - description - - model_name: Department - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - language: - oneOf: - - $ref: '#/components/schemas/LanguageEnum' - - type: string - nullable: true - description: |- - The following subset of IETF language tags can be used to configure localization. - - * `en` - en - * `de` - de - example: en - are_syncs_disabled: - type: boolean - nullable: true - default: false - description: The boolean that indicates whether initial, periodic, and force - syncs will be disabled. - integration_specific_config: - type: object - additionalProperties: {} - nullable: true - description: A JSON object containing integration-specific configuration - options. - example: - rippling: - oauth_code: 3h1jj8ssdf31dfji3o1jjdfjasd - required: - - categories - - end_user_email_address - - end_user_organization_name - - end_user_origin_id - x-merge-category: ats - ErrorValidationProblem: - type: object - properties: - source: - $ref: '#/components/schemas/ValidationProblemSource' - example: - pointer: /model/custom_fields - title: - type: string - example: Missing Required Field - detail: - type: string - example: custom_fields is a required field on model. - problem_type: - type: string - example: MISSING_REQUIRED_FIELD - required: - - detail - - problem_type - - title - x-merge-category: ats - EventTypeEnum: - enum: - - CREATED_REMOTE_PRODUCTION_API_KEY - - DELETED_REMOTE_PRODUCTION_API_KEY - - CREATED_TEST_API_KEY - - DELETED_TEST_API_KEY - - REGENERATED_PRODUCTION_API_KEY - - REGENERATED_WEBHOOK_SIGNATURE - - INVITED_USER - - TWO_FACTOR_AUTH_ENABLED - - TWO_FACTOR_AUTH_DISABLED - - DELETED_LINKED_ACCOUNT - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - CREATED_DESTINATION - - DELETED_DESTINATION - - CHANGED_DESTINATION - - CHANGED_SCOPES - - CHANGED_PERSONAL_INFORMATION - - CHANGED_ORGANIZATION_SETTINGS - - ENABLED_INTEGRATION - - DISABLED_INTEGRATION - - ENABLED_CATEGORY - - DISABLED_CATEGORY - - CHANGED_PASSWORD - - RESET_PASSWORD - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - FORCED_LINKED_ACCOUNT_RESYNC - - MUTED_ISSUE - - GENERATED_MAGIC_LINK - - ENABLED_MERGE_WEBHOOK - - DISABLED_MERGE_WEBHOOK - - MERGE_WEBHOOK_TARGET_CHANGED - - END_USER_CREDENTIALS_ACCESSED - type: string - description: |- - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - * `INVITED_USER` - INVITED_USER - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - * `CREATED_DESTINATION` - CREATED_DESTINATION - * `DELETED_DESTINATION` - DELETED_DESTINATION - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - * `CHANGED_SCOPES` - CHANGED_SCOPES - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - * `RESET_PASSWORD` - RESET_PASSWORD - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - * `MUTED_ISSUE` - MUTED_ISSUE - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - x-merge-category: ats - ExternalTargetFieldAPI: - type: object - properties: - name: - type: string - nullable: true - readOnly: true - example: example_target_field_name - description: - type: string - nullable: true - readOnly: true - example: this is a example description of a target field - is_mapped: - type: string - nullable: true - readOnly: true - example: true - x-merge-category: ats - ExternalTargetFieldAPIResponse: - type: object - properties: - Activity: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Application: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Attachment: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Candidate: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Department: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - EEOC: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - ScheduledInterview: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Job: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - JobPosting: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - JobInterviewStage: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Offer: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Office: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - RejectReason: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Scorecard: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Tag: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - RemoteUser: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - x-merge-category: ats - FieldMappingApiInstance: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: - type: boolean - readOnly: true - target_field: - type: object - properties: - name: - type: string - description: - type: string - is_organization_wide: - type: boolean - required: - - description - - is_organization_wide - - name - nullable: true - readOnly: true - example: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - type: object - properties: - remote_key_name: - type: string - nullable: true - schema: - type: object - additionalProperties: {} - nullable: true - remote_endpoint_info: - type: object - properties: - method: - type: string - nullable: true - url_path: - type: string - nullable: true - field_traversal_path: - type: array - items: - type: string - nullable: true - required: - - field_traversal_path - - method - - url_path - required: - - remote_endpoint_info - - remote_key_name - - schema - nullable: true - readOnly: true - example: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - x-merge-category: ats - FieldMappingApiInstanceResponse: - type: object - properties: - Activity: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Application: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Attachment: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Candidate: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Department: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - EEOC: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - ScheduledInterview: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Job: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - JobPosting: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - JobInterviewStage: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Offer: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Office: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - RejectReason: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Scorecard: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Tag: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - RemoteUser: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - x-merge-category: ats - FieldMappingInstanceResponse: - type: object - properties: - model: - $ref: '#/components/schemas/FieldMappingApiInstance' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: ats - FieldPermissionDeserializer: - type: object - properties: - enabled_fields: - type: array - items: {} - disabled_fields: - type: array - items: {} - x-merge-category: ats - FieldPermissionDeserializerRequest: - type: object - properties: - enabled_fields: - type: array - items: {} - disabled_fields: - type: array - items: {} - x-merge-category: ats - GenderEnum: - enum: - - MALE - - FEMALE - - NON-BINARY - - OTHER - - DECLINE_TO_SELF_IDENTIFY - type: string - description: |- - * `MALE` - MALE - * `FEMALE` - FEMALE - * `NON-BINARY` - NON-BINARY - * `OTHER` - OTHER - * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY - x-merge-category: ats - GenerateRemoteKeyRequest: - type: object - description: |- - # The GenerateRemoteKey Object - ### Description - The `GenerateRemoteKey` object is used to represent a request for a new remote key. - - ### Usage Example - Post a `GenerateRemoteKey` to create a new remote key. - properties: - name: - type: string - minLength: 1 - description: The name of the remote key - example: Remote Deployment Key 1 - required: - - name - x-merge-category: ats - IgnoreCommonModelRequest: - type: object - properties: - reason: - oneOf: - - $ref: '#/components/schemas/ReasonEnum' - - type: string - example: GENERAL_CUSTOMER_REQUEST - message: - type: string - minLength: 1 - maxLength: 256 - example: deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39 - required: - - reason - x-merge-category: ats - IndividualCommonModelScopeDeserializer: - type: object - properties: - model_name: - type: string - model_permissions: - type: object - additionalProperties: - $ref: '#/components/schemas/ModelPermissionDeserializer' - field_permissions: - $ref: '#/components/schemas/FieldPermissionDeserializer' - required: - - model_name - x-merge-category: ats - IndividualCommonModelScopeDeserializerRequest: - type: object - properties: - model_name: - type: string - minLength: 1 - model_permissions: - type: object - additionalProperties: - $ref: '#/components/schemas/ModelPermissionDeserializerRequest' - field_permissions: - $ref: '#/components/schemas/FieldPermissionDeserializerRequest' - required: - - model_name - x-merge-category: ats - Issue: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: - oneOf: - - $ref: '#/components/schemas/IssueStatusEnum' - - type: string - description: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - example: ONGOING - error_description: - type: string - example: Missing Permissions - end_user: - type: object - additionalProperties: {} - readOnly: true - example: b82302de-852e-4e60-b050-edf9da3b7c02 - first_incident_time: - type: string - format: date-time - nullable: true - example: '2022-12-05T16:19:15.161Z' - last_incident_time: - type: string - format: date-time - nullable: true - example: '2022-12-05T16:19:15.161Z' - is_muted: - type: boolean - readOnly: true - example: true - error_details: - type: array - items: - type: string - readOnly: true - example: - - Missing employee permissions. - - Missing time off permissions. - required: - - error_description - x-merge-category: ats - IssueStatusEnum: - enum: - - ONGOING - - RESOLVED - type: string - description: |- - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - x-merge-category: ats - Job: - type: object - description: |- - # The Job Object - ### Description - The `Job` object can be used to track any jobs that are currently or will be open/closed for applications. - ### Usage Example - Fetch from the `LIST Jobs` endpoint to show all job postings. - properties: - id: - type: string - format: uuid - readOnly: true - example: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '8765432' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The job's name. - example: Software Engineer (Merge is actually hiring btw) - description: - type: string - nullable: true - description: The job's description. - example: If you're reading this documentation, you might be a good fit - for Merge! - code: - type: string - nullable: true - description: The job's code. Typically an additional identifier used to - reference the particular job that is displayed on the ATS. - example: C0025 - status: - oneOf: - - $ref: '#/components/schemas/JobStatusEnum' - - type: string - nullable: true - description: |- - The job's status. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - * `DRAFT` - DRAFT - * `ARCHIVED` - ARCHIVED - * `PENDING` - PENDING - example: OPEN - type: - oneOf: - - $ref: '#/components/schemas/JobTypeEnum' - - type: string - nullable: true - description: |- - The job's type. - - * `POSTING` - POSTING - * `REQUISITION` - REQUISITION - * `PROFILE` - PROFILE - example: POSTING - job_postings: - type: array - items: - type: string - format: uuid - nullable: true - example: - - 2r3c1341-a20f-4e51-b72c-f3830a16c97b - - 543ed912-33ec-444e-a215-8d71cc42fc12 - description: IDs of `JobPosting` objects that serve as job postings for - this `Job`. - x-merge-expands-to: JobPosting - job_posting_urls: - type: array - items: - $ref: '#/components/schemas/Url' - example: - - value: https://merge.dev/careers - url_type: JOB_POSTING - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's job was created. - example: '2021-10-15T00:00:00Z' - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's job was updated. - example: '2021-10-16T00:00:00Z' - confidential: - type: boolean - nullable: true - description: Whether the job is confidential. - example: true - departments: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Department' - nullable: true - example: - - 5b3c1341-a20f-4e51-b72c-f3830a16c97b - - d6e687d6-0c36-48a1-8114-35324b5cb38f - description: IDs of `Department` objects for this `Job`. - x-merge-expands-to: Department - offices: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Office' - nullable: true - example: - - 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - description: IDs of `Office` objects for this `Job`. - x-merge-expands-to: Office - hiring_managers: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/RemoteUser' - nullable: true - example: - - 787ed912-33ec-444e-a215-8d71cc42fc12 - description: IDs of `RemoteUser` objects that serve as hiring managers for - this `Job`. - x-merge-expands-to: RemoteUser - recruiters: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/RemoteUser' - nullable: true - example: - - 787ed912-33ec-444e-a215-8d71cc42fc12 - description: IDs of `RemoteUser` objects that serve as recruiters for this - `Job`. - x-merge-expands-to: RemoteUser - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /positions - data: - - Varies by platform - x-merge-sample-json: "{\"id\": \"022a2bef-57e5-4def-8ed2-7c41bd9a5ed8\", \"\ - remote_id\": \"8765432\", \"name\": \"Software Engineer (Merge is actually - hiring btw)\", \"description\": \"If you're reading this documentation, - you might be a good fit for Merge!\", \"code\": \"C0025\", \"status\" - : \"OPEN\", \"job_posting_urls\": [{\"value\": \"https://merge.dev/careers\"\ - , \"url_type\": \"JOB_POSTING\"}], \"remote_created_at\": \"2021-10-15T00:00:00Z\"\ - , \"remote_updated_at\": \"2021-10-16T00:00:00Z\", \"confidential\": true, - \"departments\": [\"5b3c1341-a20f-4e51-b72c-f3830a16c97b\", \"d6e687d6-0c36-48a1-8114-35324b5cb38f\"\ - ], \"offices\": [\"9871b4a9-f5d2-4f3b-a66b-dfedbed42c46\"], \"hiring_managers\"\ - : [\"787ed912-33ec-444e-a215-8d71cc42fc12\"], \"remote_data\": [{\"path\" - : \"/positions\", \"data\": {\"example\": \"Varies by platform\"}}]}" - x-merge-expands: '{"departments": "Department", "hiring_managers": "RemoteUser", - "job_postings": "JobPosting", "offices": "Office", "recruiters": "RemoteUser"}' - x-merge-category: ats - JobInterviewStage: - type: object - description: |- - # The JobInterviewStage Object - ### Description - The `JobInterviewStage` object is used to represent a particular recruiting stage for an `Application`. A given `Application` typically has the `JobInterviewStage` object represented in the current_stage field. - ### Usage Example - Fetch from the `LIST JobInterviewStages` endpoint and view the job interview stages used by a company. - properties: - id: - type: string - format: uuid - readOnly: true - example: f9813dd5-e70b-484c-91d8-00acd6065b07 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '876556788' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: Standard stage names are offered by ATS systems but can be - modified by users. - example: Phone Screen - job: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Job' - nullable: true - description: This field is populated only if the stage is specific to a - particular job. If the stage is generic, this field will not be populated. - example: ba7d9648-5316-4a80-8d73-4e636cef5a90 - x-merge-expands-to: Job - stage_order: - type: integer - maximum: 2147483647 - minimum: -2147483648 - nullable: true - description: The stage’s order, with the lowest values ordered first. If - the third-party does not return details on the order of stages, this field - will not be populated. - example: 2 - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /interview-stages - data: - - Varies by platform - x-merge-expands: '{"job": "Job"}' - x-merge-category: ats - JobPosting: - type: object - description: |- - # The JobPosting Object - ### Description - The `JobPosting` object represents an external announcement on a job board created by an organization to attract qualified candidates to apply for a specific `Job` opening - ### Usage Example - Fetch from the `LIST JobPostings` endpoint to show all job postings. - properties: - id: - type: string - format: uuid - readOnly: true - example: 156a2bef-57e5-4def-8ed2-7c41bd9a554t - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '1341324' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - title: - type: string - nullable: true - description: The job posting’s title. - example: Platform - NYC - job_posting_urls: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Url' - example: - - value: https://merge.dev/careers - url_type: JOB_POSTING - description: The Url object is used to represent hyperlinks for a candidate - to apply to a given job. - job: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Job' - nullable: true - description: ID of `Job` object for this `JobPosting`. - example: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 - x-merge-expands-to: Job - status: - oneOf: - - $ref: '#/components/schemas/JobPostingStatusEnum' - - type: string - nullable: true - description: |- - The job posting's status. - - * `PUBLISHED` - PUBLISHED - * `CLOSED` - CLOSED - * `DRAFT` - DRAFT - * `INTERNAL` - INTERNAL - * `PENDING` - PENDING - example: PUBLISHED - content: - type: string - nullable: true - description: The job posting’s content. - example: Apply at https://merge.dev/careers - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's job posting was created. - example: '2021-10-15T00:00:00Z' - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's job posting was updated. - example: '2021-10-16T00:00:00Z' - is_internal: - type: boolean - nullable: true - description: Indicates whether the job posting is internal or external. - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /positions - data: - - Varies by platform - x-merge-expands: '{"job": "Job"}' - x-merge-category: ats - JobPostingStatusEnum: - enum: - - PUBLISHED - - CLOSED - - DRAFT - - INTERNAL - - PENDING - type: string - description: |- - * `PUBLISHED` - PUBLISHED - * `CLOSED` - CLOSED - * `DRAFT` - DRAFT - * `INTERNAL` - INTERNAL - * `PENDING` - PENDING - x-merge-category: ats - JobStatusEnum: - enum: - - OPEN - - CLOSED - - DRAFT - - ARCHIVED - - PENDING - type: string - description: |- - * `OPEN` - OPEN - * `CLOSED` - CLOSED - * `DRAFT` - DRAFT - * `ARCHIVED` - ARCHIVED - * `PENDING` - PENDING - x-merge-category: ats - JobTypeEnum: - enum: - - POSTING - - REQUISITION - - PROFILE - type: string - description: |- - * `POSTING` - POSTING - * `REQUISITION` - REQUISITION - * `PROFILE` - PROFILE - x-merge-category: ats - LanguageEnum: - enum: - - en - - de - type: string - description: |- - * `en` - en - * `de` - de - x-merge-category: ats - LastSyncResultEnum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - type: string - description: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - x-merge-category: ats - LinkToken: - type: object - properties: - link_token: - type: string - example: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 - integration_name: - type: string - example: Lever - magic_link_url: - type: string - example: https://link.merge.dev/asdfjkl12345jsndfgi2i83n - required: - - link_token - x-merge-category: ats - LinkedAccountCommonModelScopeDeserializerRequest: - type: object - properties: - common_models: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' - description: The common models you want to update the scopes for - example: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - home_location - disabled_fields: - - work_location - - model_name: Benefit - model_permissions: - WRITE: - is_enabled: false - required: - - common_models - x-merge-category: ats - LinkedAccountStatus: - type: object - properties: - linked_account_status: - type: string - can_make_request: - type: boolean - required: - - can_make_request - - linked_account_status - x-merge-category: ats - MetaResponse: - type: object - properties: - request_schema: - type: object - additionalProperties: {} - example: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - type: object - additionalProperties: {} - status: - $ref: '#/components/schemas/LinkedAccountStatus' - example: - linked_account_status: COMPLETE - can_make_request: true - has_conditional_params: - type: boolean - has_required_linked_account_params: - type: boolean - required: - - has_conditional_params - - has_required_linked_account_params - - request_schema - x-merge-category: ats - MethodEnum: - enum: - - GET - - OPTIONS - - HEAD - - POST - - PUT - - PATCH - - DELETE - type: string - description: |- - * `GET` - GET - * `OPTIONS` - OPTIONS - * `HEAD` - HEAD - * `POST` - POST - * `PUT` - PUT - * `PATCH` - PATCH - * `DELETE` - DELETE - x-merge-category: ats - ModelOperation: - type: object - description: |- - # The ModelOperation Object - ### Description - The `ModelOperation` object is used to represent the operations that are currently supported for a given model. - - ### Usage Example - View what operations are supported for the `Candidate` endpoint. - properties: - model_name: - type: string - example: Candidate - available_operations: - type: array - items: - type: string - example: - - FETCH - - CREATE - required_post_parameters: - type: array - items: - type: string - example: - - remote_user_id - supported_fields: - type: array - items: - type: string - example: - - first_name - - last_name - - company - - title - required: - - available_operations - - model_name - - required_post_parameters - - supported_fields - x-merge-category: ats - ModelPermissionDeserializer: - type: object - properties: - is_enabled: - type: boolean - x-merge-category: ats - ModelPermissionDeserializerRequest: - type: object - properties: - is_enabled: - type: boolean - x-merge-category: ats - MultipartFormFieldRequest: - type: object - description: |- - # The MultipartFormField Object - ### Description - The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. - - ### Usage Example - Create a `MultipartFormField` to define a multipart form entry. - properties: - name: - type: string - minLength: 1 - description: The name of the form field - example: resume - data: - type: string - minLength: 1 - description: The data for the form field. - example: SW50ZWdyYXRlIGZhc3QKSW50ZWdyYXRlIG9uY2U= - encoding: - oneOf: - - $ref: '#/components/schemas/EncodingEnum' - - type: string - nullable: true - default: RAW - description: |- - The encoding of the value of `data`. Defaults to `RAW` if not defined. - - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - example: BASE64 - file_name: - type: string - nullable: true - minLength: 1 - description: The file name of the form field, if the field is for a file. - example: resume.pdf - content_type: - type: string - nullable: true - minLength: 1 - description: The MIME type of the file, if the field is for a file. - example: application/pdf - required: - - data - - name - x-merge-category: ats - Offer: - type: object - description: |- - # The Offer Object - ### Description - The `Offer` object is used to represent an offer for a candidate's application specific to a job. - ### Usage Example - Fetch from the `LIST Offers` endpoint and filter by `ID` to show all offers. - properties: - id: - type: string - format: uuid - readOnly: true - example: dd85625c-6a59-446f-a317-6de64d83bae7 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '9876' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - application: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Application' - nullable: true - description: The application who is receiving the offer. - example: 2872ba14-4084-492b-be96-e5eee6fc33ef - x-merge-expands-to: Application - creator: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/RemoteUser' - nullable: true - description: The user who created the offer. - example: 52bf9b5e-0beb-4f6f-8a72-cd4dca7ca633 - x-merge-expands-to: RemoteUser - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's offer was created. - example: '2021-10-15T00:00:00Z' - closed_at: - type: string - format: date-time - nullable: true - description: When the offer was closed. - example: '2021-10-16T00:00:00Z' - sent_at: - type: string - format: date-time - nullable: true - description: When the offer was sent. - example: '2021-10-15T00:00:00Z' - start_date: - type: string - format: date-time - nullable: true - description: The employment start date on the offer. - example: '2021-11-15T00:00:00Z' - status: - oneOf: - - $ref: '#/components/schemas/OfferStatusEnum' - - type: string - nullable: true - description: |- - The offer's status. - - * `DRAFT` - DRAFT - * `APPROVAL-SENT` - APPROVAL-SENT - * `APPROVED` - APPROVED - * `SENT` - SENT - * `SENT-MANUALLY` - SENT-MANUALLY - * `OPENED` - OPENED - * `DENIED` - DENIED - * `SIGNED` - SIGNED - * `DEPRECATED` - DEPRECATED - example: SENT - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /offers - data: - - Varies by platform - x-merge-expands: '{"application": "Application", "creator": "RemoteUser"}' - x-merge-category: ats - OfferStatusEnum: - enum: - - DRAFT - - APPROVAL-SENT - - APPROVED - - SENT - - SENT-MANUALLY - - OPENED - - DENIED - - SIGNED - - DEPRECATED - type: string - description: |- - * `DRAFT` - DRAFT - * `APPROVAL-SENT` - APPROVAL-SENT - * `APPROVED` - APPROVED - * `SENT` - SENT - * `SENT-MANUALLY` - SENT-MANUALLY - * `OPENED` - OPENED - * `DENIED` - DENIED - * `SIGNED` - SIGNED - * `DEPRECATED` - DEPRECATED - x-merge-category: ats - Office: - type: object - description: |- - # The Office Object - ### Description - The `Office` object is used to represent an office within a company. A given `Job` has the `Office` ID in its offices field. - ### Usage Example - Fetch from the `LIST Offices` endpoint and view the offices within a company. - properties: - id: - type: string - format: uuid - readOnly: true - example: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '876556788' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The office's name. - example: SF Office - location: - type: string - nullable: true - description: The office's location. - example: Embarcadero Center 2 - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /locations - data: - - Varies by platform - x-merge-sample-json: '{"id": "9871b4a9-f5d2-4f3b-a66b-dfedbed42c46", "remote_id": - "876556788", "name": "SF Office", "location": "Embarcadero Center 2", "remote_data": - [{"path": "/locations", "data": {"example": "Varies by platform"}}]}' - x-merge-category: ats - OverallRecommendationEnum: - enum: - - DEFINITELY_NO - - NO - - YES - - STRONG_YES - - NO_DECISION - type: string - description: |- - * `DEFINITELY_NO` - DEFINITELY_NO - * `NO` - NO - * `YES` - YES - * `STRONG_YES` - STRONG_YES - * `NO_DECISION` - NO_DECISION - x-merge-category: ats - PaginatedAccountDetailsAndActionsList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/AccountDetailsAndActions' - x-merge-category: ats - PaginatedActivityList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Activity' - x-merge-category: ats - PaginatedApplicationList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Application' - x-merge-category: ats - PaginatedAttachmentList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Attachment' - x-merge-category: ats - PaginatedAuditLogEventList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/AuditLogEvent' - x-merge-category: ats - PaginatedCandidateList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Candidate' - x-merge-category: ats - PaginatedDepartmentList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Department' - x-merge-category: ats - PaginatedEEOCList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/EEOC' - x-merge-category: ats - PaginatedIssueList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Issue' - x-merge-category: ats - PaginatedJobInterviewStageList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/JobInterviewStage' - x-merge-category: ats - PaginatedJobList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Job' - x-merge-category: ats - PaginatedJobPostingList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/JobPosting' - x-merge-category: ats - PaginatedOfferList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Offer' - x-merge-category: ats - PaginatedOfficeList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Office' - x-merge-category: ats - PaginatedRejectReasonList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/RejectReason' - x-merge-category: ats - PaginatedRemoteUserList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/RemoteUser' - x-merge-category: ats - PaginatedScheduledInterviewList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/ScheduledInterview' - x-merge-category: ats - PaginatedScorecardList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Scorecard' - x-merge-category: ats - PaginatedScreeningQuestionList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/ScreeningQuestion' - x-merge-category: ats - PaginatedSyncStatusList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/SyncStatus' - x-merge-category: ats - PaginatedTagList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Tag' - x-merge-category: ats - PatchedCandidateEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/PatchedCandidateRequest' - remote_user_id: - type: string - required: - - model - - remote_user_id - x-merge-category: ats - PatchedCandidateRequest: - type: object - description: |- - # The Candidate Object - ### Description - The `Candidate` object is used to represent profile information about a given Candidate. Because it is specific to a Candidate, this information stays constant across applications. - ### Usage Example - Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates. - properties: - first_name: - type: string - nullable: true - description: The candidate's first name. - example: Gil - last_name: - type: string - nullable: true - description: The candidate's last name. - example: Feig - company: - type: string - nullable: true - description: The candidate's current company. - example: Columbia Dining App. - title: - type: string - nullable: true - description: The candidate's current title. - example: Software Engineer - last_interaction_at: - type: string - format: date-time - nullable: true - description: When the most recent interaction with the candidate occurred. - example: '2021-10-17T00:00:00Z' - is_private: - type: boolean - nullable: true - description: Whether or not the candidate is private. - example: true - can_email: - type: boolean - nullable: true - description: Whether or not the candidate can be emailed. - example: true - locations: - type: array - items: - type: string - nullable: true - description: The candidate's locations. - nullable: true - description: The candidate's locations. - example: - - San Francisco - - New York - - Miami - phone_numbers: - type: array - items: - $ref: '#/components/schemas/PhoneNumberRequest' - example: - - value: '+1234567890' - phone_number_type: MOBILE - email_addresses: - type: array - items: - $ref: '#/components/schemas/EmailAddressRequest' - example: - - value: hello@merge.dev - email_address_type: PERSONAL - urls: - type: array - items: - $ref: '#/components/schemas/UrlRequest' - example: - - value: http://alturl.com/p749b - url_type: BLOG - tags: - type: array - items: - type: string - nullable: true - description: The tag's name. - example: - - High-Priority - description: Array of `Tag` names as strings. - applications: - type: array - items: - type: string - format: uuid - nullable: true - example: - - 29eb9867-ce2a-403f-b8ce-f2844b89f078 - - b4d08e5c-de00-4d64-a29f-66addac9af99 - - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 - description: Array of `Application` object IDs. - attachments: - type: array - items: - type: string - format: uuid - nullable: true - example: - - bea08964-32b4-4a20-8bb4-2612ba09de1d - description: Array of `Attachment` object IDs. - remote_template_id: - type: string - writeOnly: true - nullable: true - minLength: 1 - example: '92830948203' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-category: ats - PatchedEditFieldMappingRequest: - type: object - properties: - remote_field_traversal_path: - type: array - items: {} - description: The field traversal path of the remote field listed when you - hit the GET /remote-fields endpoint. - example: - - example_remote_field_name - remote_method: - type: string - minLength: 1 - description: The method of the remote endpoint where the remote field is - coming from. - example: GET - remote_url_path: - type: string - minLength: 1 - description: The path of the remote endpoint where the remote field is coming - from. - example: /example-url-path - x-merge-category: ats - PhoneNumber: - type: object - description: |- - # The PhoneNumber Object - ### Description - The `PhoneNumber` object is used to represent a candidate's phone number. - ### Usage Example - Fetch from the `GET Candidate` endpoint and view their phone numbers. - properties: - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - value: - type: string - nullable: true - description: The phone number. - example: '+3198675309' - phone_number_type: - oneOf: - - $ref: '#/components/schemas/PhoneNumberTypeEnum' - - type: string - nullable: true - description: |- - The type of phone number. - - * `HOME` - HOME - * `WORK` - WORK - * `MOBILE` - MOBILE - * `SKYPE` - SKYPE - * `OTHER` - OTHER - example: HOME - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - x-merge-nested-write-allowed: true - x-merge-category: ats - PhoneNumberRequest: - type: object - description: |- - # The PhoneNumber Object - ### Description - The `PhoneNumber` object is used to represent a candidate's phone number. - ### Usage Example - Fetch from the `GET Candidate` endpoint and view their phone numbers. - properties: - value: - type: string - nullable: true - description: The phone number. - example: '+3198675309' - phone_number_type: - oneOf: - - $ref: '#/components/schemas/PhoneNumberTypeEnum' - - type: string - nullable: true - description: |- - The type of phone number. - - * `HOME` - HOME - * `WORK` - WORK - * `MOBILE` - MOBILE - * `SKYPE` - SKYPE - * `OTHER` - OTHER - example: HOME - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-category: ats - PhoneNumberTypeEnum: - enum: - - HOME - - WORK - - MOBILE - - SKYPE - - OTHER - type: string - description: |- - * `HOME` - HOME - * `WORK` - WORK - * `MOBILE` - MOBILE - * `SKYPE` - SKYPE - * `OTHER` - OTHER - x-merge-category: ats - RaceEnum: - enum: - - AMERICAN_INDIAN_OR_ALASKAN_NATIVE - - ASIAN - - BLACK_OR_AFRICAN_AMERICAN - - HISPANIC_OR_LATINO - - WHITE - - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - - TWO_OR_MORE_RACES - - DECLINE_TO_SELF_IDENTIFY - type: string - description: |- - * `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - AMERICAN_INDIAN_OR_ALASKAN_NATIVE - * `ASIAN` - ASIAN - * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN - * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO - * `WHITE` - WHITE - * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES - * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY - x-merge-category: ats - ReasonEnum: - enum: - - GENERAL_CUSTOMER_REQUEST - - GDPR - - OTHER - type: string - description: |- - * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST - * `GDPR` - GDPR - * `OTHER` - OTHER - x-merge-category: ats - RejectReason: - type: object - description: |- - # The RejectReason Object - ### Description - The `RejectReason` object is used to represent a reason for rejecting an application. These can typically be configured within an ATS system. - ### Usage Example - Fetch from the `LIST RejectReasons` endpoint and filter by `ID` to show all reasons. - properties: - id: - type: string - format: uuid - readOnly: true - example: 8be99a4a-f8d4-4339-bf1e-30eac970e217 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '876556788' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The rejection reason’s name. - example: Not passionate enough about APIs. - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /rejection-reasons - data: - - Varies by platform - x-merge-category: ats - RemoteData: - type: object - description: |- - # The RemoteData Object - ### Description - The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. - - ### Usage Example - TODO - properties: - path: - type: string - description: The third-party API path that is being called. - example: /platform-endpoint - data: - readOnly: true - description: The data returned from the third-party for this object in its - original, unnormalized format. - example: - - Varies by platform - required: - - path - x-merge-category: ats - RemoteEndpointInfo: - type: object - properties: - method: - type: string - example: GET - url_path: - type: string - example: /example-url-path - field_traversal_path: - type: array - items: {} - example: - - example_key_name - required: - - field_traversal_path - - method - - url_path - x-merge-category: ats - RemoteFieldAPI: - type: object - properties: - schema: - type: object - additionalProperties: {} - example: - type: string - remote_key_name: - type: string - example: example_remote_key_name - remote_endpoint_info: - $ref: '#/components/schemas/RemoteEndpointInfo' - example: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - type: array - items: {} - nullable: true - example: - - example - advanced_metadata: - allOf: - - $ref: '#/components/schemas/AdvancedMetadata' - nullable: true - coverage: - oneOf: - - type: integer - - type: number - format: double - nullable: true - readOnly: true - example: 0.33 - required: - - advanced_metadata - - remote_endpoint_info - - remote_key_name - - schema - x-merge-category: ats - RemoteFieldAPIResponse: - type: object - properties: - Activity: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Application: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Attachment: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Candidate: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Department: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - EEOC: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - ScheduledInterview: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Job: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - JobPosting: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - JobInterviewStage: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Offer: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Office: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - RejectReason: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Scorecard: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Tag: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - RemoteUser: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - x-merge-category: ats - RemoteKey: - type: object - description: |- - # The RemoteKey Object - ### Description - The `RemoteKey` object is used to represent a request for a new remote key. - - ### Usage Example - Post a `GenerateRemoteKey` to receive a new `RemoteKey`. - properties: - name: - type: string - example: Remote Deployment Key 1 - key: - type: string - example: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - required: - - key - - name - x-merge-category: ats - RemoteKeyForRegenerationRequest: - type: object - description: |- - # The RemoteKeyForRegeneration Object - ### Description - The `RemoteKeyForRegeneration` object is used to exchange an old remote key for a new one - - ### Usage Example - Post a `RemoteKeyForRegeneration` to swap out an old remote key for a new one - properties: - name: - type: string - minLength: 1 - description: The name of the remote key - example: Remote Deployment Key 1 - required: - - name - x-merge-category: ats - RemoteResponse: - type: object - description: |- - # The RemoteResponse Object - ### Description - The `RemoteResponse` object is used to represent information returned from a third-party endpoint. - - ### Usage Example - View the `RemoteResponse` returned from your `DataPassthrough`. - properties: - method: - type: string - example: GET - path: - type: string - example: /scooters - status: - type: integer - example: 200 - response: - example: - scooters: - - company: Lime - model: Gen 2.5 - - company: Bird - model: Bird Zero - response_headers: - type: object - additionalProperties: {} - example: - X-Page-Token: value - response_type: - oneOf: - - $ref: '#/components/schemas/ResponseTypeEnum' - - type: string - example: JSON - headers: - type: object - additionalProperties: {} - example: - EXTRA-HEADER: value - Authorization: - required: - - method - - path - - response - - status - x-merge-category: ats - RemoteUser: - type: object - description: |- - # The RemoteUser Object - ### Description - The `RemoteUser` object is used to represent a user with a login to the ATS system. - ### Usage Example - Fetch from the `LIST RemoteUsers` endpoint to show all users for a third party. - properties: - id: - type: string - format: uuid - readOnly: true - example: b82302de-852e-4e60-b050-edf9da3b7c02 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '344321' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - first_name: - type: string - nullable: true - description: The user's first name. - example: Shensi - last_name: - type: string - nullable: true - description: The user's last name. - example: Ding - email: - type: string - format: email - nullable: true - description: The user's email. - maxLength: 254 - example: hello@merge.dev - disabled: - type: boolean - nullable: true - description: Whether the user's account had been disabled. - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's user was created. - example: '2020-11-10T00:00:00Z' - access_role: - oneOf: - - $ref: '#/components/schemas/AccessRoleEnum' - - type: string - nullable: true - description: |- - The user's role. - - * `SUPER_ADMIN` - SUPER_ADMIN - * `ADMIN` - ADMIN - * `TEAM_MEMBER` - TEAM_MEMBER - * `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER - * `INTERVIEWER` - INTERVIEWER - example: SUPER_ADMIN - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /users - data: - - Varies by platform - x-merge-sample-json: '{"id": "b82302de-852e-4e60-b050-edf9da3b7c02", "remote_id": - "344321", "first_name": "Shensi", "last_name": "Ding", "email": "hello@merge.dev", - "disabled": false, "remote_created_at": "2020-11-10T00:00:00Z", "access_role": - "SUPER_ADMIN", "remote_data": [{"path": "/users", "data": {"example": "Varies - by platform"}}]}' - x-merge-category: ats - RequestFormatEnum: - enum: - - JSON - - XML - - MULTIPART - type: string - description: |- - * `JSON` - JSON - * `XML` - XML - * `MULTIPART` - MULTIPART - x-merge-category: ats - ResponseTypeEnum: - enum: - - JSON - - BASE64_GZIP - type: string - description: |- - * `JSON` - JSON - * `BASE64_GZIP` - BASE64_GZIP - x-merge-category: ats - RoleEnum: - enum: - - ADMIN - - DEVELOPER - - MEMBER - - API - - SYSTEM - - MERGE_TEAM - type: string - description: |- - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - x-merge-category: ats - ScheduledInterview: - type: object - description: |- - # The ScheduledInterview Object - ### Description - The `ScheduledInterview` object is used to represent a scheduled interview for a given candidate’s application to a job. An `Application` can have multiple `ScheduledInterview`s depending on the particular hiring process. - ### Usage Example - Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers` to show all office locations. - properties: - id: - type: string - format: uuid - readOnly: true - example: b8faf072-98b9-4445-8a9a-6b4950efca19 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '3' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - application: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Application' - nullable: true - description: The application being interviewed. - example: 92e8a369-fffe-430d-b93a-f7e8a16563f1 - x-merge-expands-to: Application - job_interview_stage: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/JobInterviewStage' - nullable: true - description: The stage of the interview. - example: 2f7adb59-3fe6-4b5b-aef6-563f72bd13dc - x-merge-expands-to: JobInterviewStage - organizer: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/RemoteUser' - nullable: true - description: The user organizing the interview. - example: 52bf9b5e-0beb-4f6f-8a72-cd4dca7ca633 - x-merge-expands-to: RemoteUser - interviewers: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/RemoteUser' - nullable: true - example: - - f9813dd5-e70b-484c-91d8-00acd6065b07 - - 89a86fcf-d540-4e6b-ac3d-ce07c4ec9b3c - description: Array of `RemoteUser` IDs. - x-merge-expands-to: RemoteUser - location: - type: string - nullable: true - description: The interview's location. - example: Embarcadero Center 2 - start_at: - type: string - format: date-time - nullable: true - description: When the interview was started. - example: '2021-10-15T00:00:00Z' - end_at: - type: string - format: date-time - nullable: true - description: When the interview was ended. - example: '2021-10-15T02:00:00Z' - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's interview was created. - example: '2021-10-15T00:00:00Z' - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's interview was updated. - example: '2021-10-15T00:00:00Z' - status: - oneOf: - - $ref: '#/components/schemas/ScheduledInterviewStatusEnum' - - type: string - nullable: true - description: |- - The interview's status. - - * `SCHEDULED` - SCHEDULED - * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK - * `COMPLETE` - COMPLETE - example: SCHEDULED - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /interviews - data: - - Varies by platform - x-merge-expands: '{"application": "Application", "interviewers": "RemoteUser", - "job_interview_stage": "JobInterviewStage", "organizer": "RemoteUser"}' - x-merge-category: ats - ScheduledInterviewEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/ScheduledInterviewRequest' - remote_user_id: - type: string - required: - - model - - remote_user_id - x-merge-category: ats - ScheduledInterviewRequest: - type: object - description: |- - # The ScheduledInterview Object - ### Description - The `ScheduledInterview` object is used to represent a scheduled interview for a given candidate’s application to a job. An `Application` can have multiple `ScheduledInterview`s depending on the particular hiring process. - ### Usage Example - Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers` to show all office locations. - properties: - application: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Application' - nullable: true - description: The application being interviewed. - example: 92e8a369-fffe-430d-b93a-f7e8a16563f1 - x-merge-expands-to: Application - job_interview_stage: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/JobInterviewStage' - nullable: true - description: The stage of the interview. - example: 2f7adb59-3fe6-4b5b-aef6-563f72bd13dc - x-merge-expands-to: JobInterviewStage - organizer: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/RemoteUser' - nullable: true - description: The user organizing the interview. - example: 52bf9b5e-0beb-4f6f-8a72-cd4dca7ca633 - x-merge-expands-to: RemoteUser - interviewers: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/RemoteUser' - nullable: true - example: - - f9813dd5-e70b-484c-91d8-00acd6065b07 - - 89a86fcf-d540-4e6b-ac3d-ce07c4ec9b3c - description: Array of `RemoteUser` IDs. - x-merge-expands-to: RemoteUser - location: - type: string - nullable: true - description: The interview's location. - example: Embarcadero Center 2 - start_at: - type: string - format: date-time - nullable: true - description: When the interview was started. - example: '2021-10-15T00:00:00Z' - end_at: - type: string - format: date-time - nullable: true - description: When the interview was ended. - example: '2021-10-15T02:00:00Z' - status: - oneOf: - - $ref: '#/components/schemas/ScheduledInterviewStatusEnum' - - type: string - nullable: true - description: |- - The interview's status. - - * `SCHEDULED` - SCHEDULED - * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK - * `COMPLETE` - COMPLETE - example: SCHEDULED - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"application": "Application", "interviewers": "RemoteUser", - "job_interview_stage": "JobInterviewStage", "organizer": "RemoteUser"}' - x-merge-category: ats - ScheduledInterviewResponse: - type: object - properties: - model: - $ref: '#/components/schemas/ScheduledInterview' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: ats - ScheduledInterviewStatusEnum: - enum: - - SCHEDULED - - AWAITING_FEEDBACK - - COMPLETE - type: string - description: |- - * `SCHEDULED` - SCHEDULED - * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK - * `COMPLETE` - COMPLETE - x-merge-category: ats - Scorecard: - type: object - description: |- - # The Scorecard Object - ### Description - The `Scorecard` object is used to represent an interviewer's candidate recommendation based on a particular interview. - ### Usage Example - Fetch from the `LIST Scorecards` endpoint and filter by `application` to show all scorecard for an applicant. - properties: - id: - type: string - format: uuid - readOnly: true - example: 3eab2f17-eeb1-450d-97f0-029d8be1e06f - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '22234' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - application: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Application' - nullable: true - description: The application being scored. - example: 2872ba14-4084-492b-be96-e5eee6fc33ef - x-merge-expands-to: Application - interview: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/ScheduledInterview' - nullable: true - description: The interview being scored. - example: 52bf9b5e-0beb-4f6f-8a72-cd4dca7ca633 - x-merge-expands-to: ScheduledInterview - interviewer: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/RemoteUser' - nullable: true - description: The interviewer doing the scoring. - example: bbb519a3-246e-4b95-b6b3-dba16107ba6b - x-merge-expands-to: RemoteUser - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's scorecard was created. - example: '2021-10-15T00:00:00Z' - submitted_at: - type: string - format: date-time - nullable: true - description: When the scorecard was submitted. - example: '2021-10-15T00:00:00Z' - overall_recommendation: - oneOf: - - $ref: '#/components/schemas/OverallRecommendationEnum' - - type: string - nullable: true - description: |- - The inteviewer's recommendation. - - * `DEFINITELY_NO` - DEFINITELY_NO - * `NO` - NO - * `YES` - YES - * `STRONG_YES` - STRONG_YES - * `NO_DECISION` - NO_DECISION - example: STRONG_YES - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /ratings - data: - - Varies by platform - x-merge-expands: '{"application": "Application", "interview": "ScheduledInterview", - "interviewer": "RemoteUser"}' - x-merge-category: ats - ScreeningQuestion: - type: object - description: |- - # The ScreeningQuestion Object - ### Description - The `ScreeningQuestion` object is used to represent questions asked to screen candidates for a job. - - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 0238cbc6-6040-430a-848e-aaiehfhdbadf4ae - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '23729392' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - job: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Job' - nullable: true - description: The job associated with the screening question. - example: 92e8a369-fffe-430d-b93a-f7e8a16563f1 - x-merge-expands-to: Job - description: - type: string - nullable: true - description: The description of the screening question - maxLength: 500 - example: Are you currently authorized to work for any employer in the country - outlined for this role? - title: - type: string - nullable: true - description: The title of the screening question - maxLength: 2500 - example: Work Authorisation - type: - oneOf: - - $ref: '#/components/schemas/ScreeningQuestionTypeEnum' - - type: string - nullable: true - description: |- - The data type for the screening question. - - * `DATE` - DATE - * `FILE` - FILE - * `SINGLE_SELECT` - SINGLE_SELECT - * `MULTI_SELECT` - MULTI_SELECT - * `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT - * `MULTI_LINE_TEXT` - MULTI_LINE_TEXT - * `NUMERIC` - NUMERIC - * `BOOLEAN` - BOOLEAN - example: SINGLE_SELECT - required: - type: boolean - nullable: true - description: Whether or not the screening question is required. - example: true - options: - type: array - items: - oneof: - - type: string - format: uuid - - $ref: '#/components/schemas/ScreeningQuestionOption' - example: - - remote_id: '19281' - label: I am currently authorised - - remote_id: '38372' - label: I am currently not eligible - x-merge-expands-to: ScreeningQuestionOption - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - x-merge-expands: '{"job": "Job", "options": "ScreeningQuestionOption"}' - x-merge-category: ats - ScreeningQuestionAnswer: - type: object - description: |- - # The ScreeningQuestionAnswer Object - ### Description - The `ScreeningQuestionAnswer` object is used to represent candidate responses to a screening question, for a specific application. - - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '088899' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - question: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/ScreeningQuestion' - nullable: true - example: 0238cbc6-6040-430a-848e-aaiehfhdbadf4ae - description: The screening question associated with the candidate’s answer. - To determine the data type of the answer, you can expand on the screening - question by adding `screening_question_answers.question` to the `expand` - query parameter. - x-merge-expands-to: ScreeningQuestion - answer: - type: string - nullable: true - description: The candidate’s response to the screening question. - maxLength: 10000 - example: 5+ years experience - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - x-merge-nested-write-allowed: true - x-merge-expands: '{"question": "ScreeningQuestion"}' - x-merge-category: ats - ScreeningQuestionAnswerRequest: - type: object - description: |- - # The ScreeningQuestionAnswer Object - ### Description - The `ScreeningQuestionAnswer` object is used to represent candidate responses to a screening question, for a specific application. - - ### Usage Example - TODO - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '088899' - question: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/ScreeningQuestion' - nullable: true - example: 0238cbc6-6040-430a-848e-aaiehfhdbadf4ae - description: The screening question associated with the candidate’s answer. - To determine the data type of the answer, you can expand on the screening - question by adding `screening_question_answers.question` to the `expand` - query parameter. - x-merge-expands-to: ScreeningQuestion - answer: - type: string - nullable: true - description: The candidate’s response to the screening question. - maxLength: 10000 - example: 5+ years experience - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"question": "ScreeningQuestion"}' - x-merge-category: ats - ScreeningQuestionOption: - type: object - description: |- - # The ScreeningQuestionOption Object - ### Description - The `ScreeningQuestionOption` object is used to represent options for a `ScreeningQuestion` object - - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - label: - type: string - nullable: true - description: Available response options - maxLength: 300 - example: 5+ years experience - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - x-merge-nested-write-allowed: true - x-merge-category: ats - ScreeningQuestionTypeEnum: - enum: - - DATE - - FILE - - SINGLE_SELECT - - MULTI_SELECT - - SINGLE_LINE_TEXT - - MULTI_LINE_TEXT - - NUMERIC - - BOOLEAN - type: string - description: |- - * `DATE` - DATE - * `FILE` - FILE - * `SINGLE_SELECT` - SINGLE_SELECT - * `MULTI_SELECT` - MULTI_SELECT - * `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT - * `MULTI_LINE_TEXT` - MULTI_LINE_TEXT - * `NUMERIC` - NUMERIC - * `BOOLEAN` - BOOLEAN - x-merge-category: ats - SelectiveSyncConfigurationsUsageEnum: - enum: - - IN_NEXT_SYNC - - IN_LAST_SYNC - type: string - description: |- - * `IN_NEXT_SYNC` - IN_NEXT_SYNC - * `IN_LAST_SYNC` - IN_LAST_SYNC - x-merge-category: ats - StatusFd5Enum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - type: string - description: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - x-merge-category: ats - SyncStatus: - type: object - description: |- - # The SyncStatus Object - ### Description - The `SyncStatus` object is used to represent the syncing state of an account - - ### Usage Example - View the `SyncStatus` for an account to see how recently its models were synced. - properties: - model_name: - type: string - example: Candidate - model_id: - type: string - example: ats.Candidate - last_sync_start: - type: string - format: date-time - example: '2021-03-30T19:44:18.695973Z' - next_sync_start: - type: string - format: date-time - example: '2021-03-30T20:44:18.662942Z' - last_sync_result: - oneOf: - - $ref: '#/components/schemas/LastSyncResultEnum' - - type: string - example: DONE - last_sync_finished: - type: string - format: date-time - example: '2021-03-30T19:55:18.695973Z' - status: - oneOf: - - $ref: '#/components/schemas/StatusFd5Enum' - - type: string - example: SYNCING - is_initial_sync: - type: boolean - example: true - selective_sync_configurations_usage: - $ref: '#/components/schemas/SelectiveSyncConfigurationsUsageEnum' - required: - - is_initial_sync - - model_id - - model_name - - status - x-merge-sample-json: '{"model_name": "Candidate", "model_id": "ats.Candidate", - "last_sync_start": "2021-03-30T19:44:18.695973Z", "next_sync_start": "2021-03-30T20:44:18.662942Z", - "status": "SYNCING", "is_initial_sync": true}' - x-merge-category: ats - Tag: - type: object - description: |- - # The Tag Object - ### Description - The `Tag` object is used to represent a tag for a candidate. - ### Usage Example - Fetch from the `LIST Tags` endpoint and view the tags used within a company. - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '4567' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The tag's name. - example: High-Priority - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - type: object - additionalProperties: {} - nullable: true - description: The full data pulled from the third-party API for an object. - nullable: true - example: - - path: /tags - data: - - Varies by platform - x-merge-category: ats - UpdateApplicationStageRequest: - type: object - properties: - job_interview_stage: - type: string - format: uuid - nullable: true - description: The interview stage to move the application to. - remote_user_id: - type: string - minLength: 1 - x-merge-category: ats - Url: - type: object - description: |- - # The Url Object - ### Description - The `Url` object is used to represent hyperlinks associated with the parent model. - ### Usage Example - Fetch from the `GET Candidate` endpoint and view their website urls. - properties: - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - value: - type: string - format: uri - nullable: true - description: The site's url. - maxLength: 2000 - example: http://alturl.com/p749b - url_type: - oneOf: - - $ref: '#/components/schemas/UrlTypeEnum' - - type: string - nullable: true - description: |- - The type of site. - - * `PERSONAL` - PERSONAL - * `COMPANY` - COMPANY - * `PORTFOLIO` - PORTFOLIO - * `BLOG` - BLOG - * `SOCIAL_MEDIA` - SOCIAL_MEDIA - * `OTHER` - OTHER - * `JOB_POSTING` - JOB_POSTING - example: PERSONAL - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - x-merge-nested-write-allowed: true - x-merge-category: ats - UrlRequest: - type: object - description: |- - # The Url Object - ### Description - The `Url` object is used to represent hyperlinks associated with the parent model. - ### Usage Example - Fetch from the `GET Candidate` endpoint and view their website urls. - properties: - value: - type: string - format: uri - nullable: true - description: The site's url. - maxLength: 2000 - example: http://alturl.com/p749b - url_type: - oneOf: - - $ref: '#/components/schemas/UrlTypeEnum' - - type: string - nullable: true - description: |- - The type of site. - - * `PERSONAL` - PERSONAL - * `COMPANY` - COMPANY - * `PORTFOLIO` - PORTFOLIO - * `BLOG` - BLOG - * `SOCIAL_MEDIA` - SOCIAL_MEDIA - * `OTHER` - OTHER - * `JOB_POSTING` - JOB_POSTING - example: PERSONAL - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-category: ats - UrlTypeEnum: - enum: - - PERSONAL - - COMPANY - - PORTFOLIO - - BLOG - - SOCIAL_MEDIA - - OTHER - - JOB_POSTING - type: string - description: |- - * `PERSONAL` - PERSONAL - * `COMPANY` - COMPANY - * `PORTFOLIO` - PORTFOLIO - * `BLOG` - BLOG - * `SOCIAL_MEDIA` - SOCIAL_MEDIA - * `OTHER` - OTHER - * `JOB_POSTING` - JOB_POSTING - x-merge-category: ats - ValidationProblemSource: - type: object - properties: - pointer: - type: string - required: - - pointer - x-merge-category: ats - VeteranStatusEnum: - enum: - - I_AM_NOT_A_PROTECTED_VETERAN - - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN - - I_DONT_WISH_TO_ANSWER - type: string - description: |- - * `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN - * `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN - * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER - x-merge-category: ats - VisibilityEnum: - enum: - - ADMIN_ONLY - - PUBLIC - - PRIVATE - type: string - description: |- - * `ADMIN_ONLY` - ADMIN_ONLY - * `PUBLIC` - PUBLIC - * `PRIVATE` - PRIVATE - x-merge-category: ats - WarningValidationProblem: - type: object - properties: - source: - $ref: '#/components/schemas/ValidationProblemSource' - example: - pointer: /age - title: - type: string - example: Unrecognized Field - detail: - type: string - example: An unrecognized field, age, was passed in with request data. - problem_type: - type: string - example: UNRECOGNIZED_FIELD - required: - - detail - - problem_type - - title - x-merge-category: ats - WebhookReceiver: - type: object - properties: - event: - type: string - is_active: - type: boolean - key: - type: string - required: - - event - - is_active - x-merge-category: ats - WebhookReceiverRequest: - type: object - properties: - event: - type: string - minLength: 1 - is_active: - type: boolean - key: - type: string - minLength: 1 - required: - - event - - is_active - x-merge-category: ats - securitySchemes: - tokenAuth: - type: http - scheme: bearer - description: Token-based authentication with required prefix "Bearer" - x-fern-token-variable-name: api_key -servers: -- url: https://api.merge.dev/api/ats/v1 - description: Production - x-fern-server-name: Production -- url: https://api-sandbox.merge.dev/api/ats/v1 - description: Sandbox - x-fern-server-name: Sandbox -- url: https://api-eu.merge.dev/api/ats/v1 - description: Production EU - x-fern-server-name: ProductionEU -- url: https://api-ap.merge.dev/api/ats/v1 - description: Production APSE1 - x-fern-server-name: ProductionAPSE1 diff --git a/.mock/crm_v3.yml b/.mock/crm_v3.yml deleted file mode 100644 index 4e754eb5f..000000000 --- a/.mock/crm_v3.yml +++ /dev/null @@ -1,12652 +0,0 @@ -openapi: 3.0.3 -info: - title: Merge CRM API - version: '1.0' - description: The unified API for building rich integrations with multiple CRM platforms. - contact: - name: Merge Team - url: https://www.merge.dev/ - email: hello@merge.dev -paths: - /crm/v1/account-details: - get: - operationId: account_details_retrieve - description: Get details for a linked account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - account-details - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AccountDetails' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/account-token/{public_token}: - get: - operationId: account_token_retrieve - description: Returns the account token for the end user with the provided public - token. - parameters: - - in: path - name: public_token - schema: - type: string - required: true - tags: - - account-token - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AccountToken' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/accounts: - get: - operationId: accounts_list - description: Returns a list of `Account` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - owner - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandOwner: - value: owner - summary: Expand Owner - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: name - schema: - type: string - nullable: true - description: If provided, will only return accounts with this name. - - in: query - name: owner_id - schema: - type: string - description: If provided, will only return accounts with this owner. - examples: - OwnerId: - summary: owner_id - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAccountList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: accounts_create - description: Creates an `Account` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - accounts - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CRMAccountEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/CRMAccountEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/CRMAccountEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/CRMAccountResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/accounts/{id}: - get: - operationId: accounts_retrieve - description: Returns an `Account` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - owner - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandOwner: - value: owner - summary: Expand Owner - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Account' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - patch: - operationId: accounts_partial_update - description: Updates an `Account` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - accounts - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedCRMAccountEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedCRMAccountEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedCRMAccountEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CRMAccountResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/accounts/meta/patch/{id}: - get: - operationId: accounts_meta_patch_retrieve - description: Returns metadata for `CRMAccount` PATCHs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - tags: - - accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-patch: META_PATCH - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/accounts/meta/post: - get: - operationId: accounts_meta_post_retrieve - description: Returns metadata for `CRMAccount` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/accounts/remote-field-classes: - get: - operationId: accounts_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/async-passthrough: - post: - operationId: async_passthrough_create - description: Asynchronously pull data from an endpoint not currently supported - by Merge. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - async-passthrough - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AsyncPassthroughReciept' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/async-passthrough/{async_passthrough_receipt_id}: - get: - operationId: async_passthrough_retrieve - description: Retrieves data from earlier async-passthrough POST request - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: async_passthrough_receipt_id - schema: - type: string - format: uuid - required: true - tags: - - async-passthrough - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/RemoteResponse' - - type: string - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/audit-trail: - get: - operationId: audit_trail_list - description: Gets a list of audit trail events. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_date - schema: - type: string - description: If included, will only include audit trail events that occurred - before this time - - in: query - name: event_type - schema: - type: string - description: 'If included, will only include events with the given event type. - Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, - `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, - `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, - `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, - `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, - `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, - `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, - `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, - `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, - `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`' - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: start_date - schema: - type: string - description: If included, will only include audit trail events that occurred - after this time - - in: query - name: user_email - schema: - type: string - description: If provided, this will return events associated with the specified - user email. Please note that the email address reflects the user's email - at the time of the event, and may not be their current email. - tags: - - audit-trail - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAuditLogEventList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/available-actions: - get: - operationId: available_actions_retrieve - description: Returns a list of models and actions available for an account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - available-actions - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AvailableActions' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/contacts: - get: - operationId: contacts_list - description: Returns a list of `Contact` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: account_id - schema: - type: string - description: If provided, will only return contacts with this account. - examples: - AccountId: - summary: account_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: email_addresses - schema: - type: string - description: If provided, will only return contacts matching the email addresses; - multiple email_addresses can be separated by commas. - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - owner - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandAccount,Owner: - value: account,owner - summary: Expand Account, Owner - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: phone_numbers - schema: - type: string - description: If provided, will only return contacts matching the phone numbers; - multiple phone numbers can be separated by commas. - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - contacts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedContactList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: contacts_create - description: Creates a `Contact` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - contacts - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CRMContactEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/CRMContactEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/CRMContactEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/CRMContactResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/contacts/{id}: - get: - operationId: contacts_retrieve - description: Returns a `Contact` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - owner - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandAccount,Owner: - value: account,owner - summary: Expand Account, Owner - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - contacts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Contact' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - patch: - operationId: contacts_partial_update - description: Updates a `Contact` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - contacts - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedCRMContactEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedCRMContactEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedCRMContactEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CRMContactResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/contacts/ignore/{model_id}: - post: - operationId: contacts_ignore_create - description: Ignores a specific row based on the `model_id` in the url. These - records will have their properties set to null, and will not be updated in - future syncs. The "reason" and "message" fields in the request body will be - stored for audit purposes. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: model_id - schema: - type: string - format: uuid - required: true - tags: - - contacts - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/IgnoreCommonModelRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/IgnoreCommonModelRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/IgnoreCommonModelRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - description: No response body - x-extra-tags: - - ignore-model - /crm/v1/contacts/meta/patch/{id}: - get: - operationId: contacts_meta_patch_retrieve - description: Returns metadata for `CRMContact` PATCHs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - tags: - - contacts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-patch: META_PATCH - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/contacts/meta/post: - get: - operationId: contacts_meta_post_retrieve - description: Returns metadata for `CRMContact` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - contacts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/contacts/remote-field-classes: - get: - operationId: contacts_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - contacts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/custom-object-classes: - get: - operationId: custom_object_classes_list - description: Returns a list of `CustomObjectClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - fields - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandFields: - value: fields - summary: Expand Fields - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - custom-object-classes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedCustomObjectClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/custom-object-classes/{custom_object_class_id}/association-types: - get: - operationId: custom_object_classes_association_types_list - description: Returns a list of `AssociationType` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: path - name: custom_object_class_id - schema: - type: string - format: uuid - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - target_object_classes - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandTargetObjectClasses: - value: target_object_classes - summary: Expand Target_object_classes - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - association-types - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAssociationTypeList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - post: - operationId: custom_object_classes_association_types_create - description: Creates an `AssociationType` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: custom_object_class_id - schema: - type: string - format: uuid - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - association-types - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CRMAssociationTypeEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/CRMAssociationTypeEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/CRMAssociationTypeEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/CRMAssociationTypeResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/{id}: - get: - operationId: custom_object_classes_association_types_retrieve - description: Returns an `AssociationType` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: custom_object_class_id - schema: - type: string - format: uuid - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - target_object_classes - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandTargetObjectClasses: - value: target_object_classes - summary: Expand Target_object_classes - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - association-types - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AssociationType' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/meta/post: - get: - operationId: custom_object_classes_association_types_meta_post_retrieve - description: Returns metadata for `CRMAssociationType` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: custom_object_class_id - schema: - type: string - format: uuid - required: true - tags: - - association-types - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects: - get: - operationId: custom_object_classes_custom_objects_list - description: Returns a list of `CustomObject` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: path - name: custom_object_class_id - schema: - type: string - format: uuid - required: true - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - custom-objects - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedCustomObjectList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - post: - operationId: custom_object_classes_custom_objects_create - description: Creates a `CustomObject` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: custom_object_class_id - schema: - type: string - format: uuid - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - custom-objects - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CRMCustomObjectEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/CRMCustomObjectEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/CRMCustomObjectEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/CRMCustomObjectResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{id}: - get: - operationId: custom_object_classes_custom_objects_retrieve - description: Returns a `CustomObject` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: custom_object_class_id - schema: - type: string - format: uuid - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - custom-objects - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CustomObject' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{object_id}/associations: - get: - operationId: custom_object_classes_custom_objects_associations_list - description: Returns a list of `Association` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: association_type_id - schema: - type: string - description: If provided, will only return opportunities with this association_type. - examples: - AssociationTypeId: - summary: association_type_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: path - name: custom_object_class_id - schema: - type: string - format: uuid - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - association_type - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandAssociationType: - value: association_type - summary: Expand Association_type - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: path - name: object_id - schema: - type: string - format: uuid - required: true - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - associations - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAssociationList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/meta/post: - get: - operationId: custom_object_classes_custom_objects_meta_post_retrieve - description: Returns metadata for `CRMCustomObject` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: custom_object_class_id - schema: - type: string - format: uuid - required: true - tags: - - custom-objects - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/custom-object-classes/{id}: - get: - operationId: custom_object_classes_retrieve - description: Returns a `CustomObjectClass` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - fields - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandFields: - value: fields - summary: Expand Fields - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - custom-object-classes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CustomObjectClass' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - ? /crm/v1/custom-object-classes/{source_class_id}/custom-objects/{source_object_id}/associations/{target_class_id}/{target_object_id}/{association_type_id} - : put: - operationId: custom_object_classes_custom_objects_associations_update - description: Creates an Association between `source_object_id` and `target_object_id` - of type `association_type_id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: association_type_id - schema: - type: string - format: uuid - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - - in: path - name: source_class_id - schema: - type: string - format: uuid - required: true - - in: path - name: source_object_id - schema: - type: string - format: uuid - required: true - - in: path - name: target_class_id - schema: - type: string - required: true - - in: path - name: target_object_id - schema: - type: string - format: uuid - required: true - tags: - - associations - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Association' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/custom-object-classes/custom-objects/remote-field-classes: - get: - operationId: custom_object_classes_custom_objects_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - custom-objects - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/default-scopes: - get: - operationId: default_scopes_retrieve - description: Get the default permissions for Merge Common Models and fields - across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - tags: - - scopes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/delete-account: - post: - operationId: delete_account_delete - description: Delete a linked account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - delete-account - security: - - tokenAuth: [] - responses: - '200': - description: No response body - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/engagement-types: - get: - operationId: engagement_types_list - description: Returns a list of `EngagementType` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - engagement-types - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedEngagementTypeList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/engagement-types/{id}: - get: - operationId: engagement_types_retrieve - description: Returns an `EngagementType` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - engagement-types - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/EngagementType' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/engagement-types/remote-field-classes: - get: - operationId: engagement_types_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - engagement-types - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/engagements: - get: - operationId: engagements_list - description: Returns a list of `Engagement` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - contacts - - engagement_type - - owner - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandContacts,Owner,Account,EngagementType: - value: contacts,owner,account,engagement_type - summary: Expand Contacts, Owner, Account, Engagement_type - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: started_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return engagements started after this - datetime. - - in: query - name: started_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return engagements started before this - datetime. - tags: - - engagements - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedEngagementList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: engagements_create - description: Creates an `Engagement` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - engagements - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EngagementEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/EngagementEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/EngagementEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/EngagementResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/engagements/{id}: - get: - operationId: engagements_retrieve - description: Returns an `Engagement` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - contacts - - engagement_type - - owner - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandContacts,Owner,Account,EngagementType: - value: contacts,owner,account,engagement_type - summary: Expand Contacts, Owner, Account, Engagement_type - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - engagements - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Engagement' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - patch: - operationId: engagements_partial_update - description: Updates an `Engagement` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - engagements - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedEngagementEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedEngagementEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedEngagementEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/EngagementResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/engagements/meta/patch/{id}: - get: - operationId: engagements_meta_patch_retrieve - description: Returns metadata for `Engagement` PATCHs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - tags: - - engagements - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-patch: META_PATCH - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/engagements/meta/post: - get: - operationId: engagements_meta_post_retrieve - description: Returns metadata for `Engagement` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - engagements - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/engagements/remote-field-classes: - get: - operationId: engagements_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - engagements - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/field-mappings: - get: - operationId: field_mappings_retrieve - description: Get all Field Mappings for this Linked Account. Field Mappings - are mappings between third-party Remote Fields and user defined Merge fields. - [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: exclude_remote_field_metadata - schema: - type: boolean - description: If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` - will be null). This will increase the speed of the request since these fields - require some calculations. - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingApiInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: field_mappings_create - description: Create new Field Mappings that will be available after the next - scheduled sync. This will cause the next sync for this Linked Account to sync - **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: exclude_remote_field_metadata - schema: - type: boolean - description: If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` - will be null). This will increase the speed of the request since these fields - require some calculations. - tags: - - field-mapping - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/field-mappings/{field_mapping_id}: - patch: - operationId: field_mappings_partial_update - description: Create or update existing Field Mappings for a Linked Account. - Changes will be reflected after the next scheduled sync. This will cause the - next sync for this Linked Account to sync **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: field_mapping_id - schema: - type: string - format: uuid - required: true - tags: - - field-mapping - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - delete: - operationId: field_mappings_destroy - description: Deletes Field Mappings for a Linked Account. All data related to - this Field Mapping will be deleted and these changes will be reflected after - the next scheduled sync. This will cause the next sync for this Linked Account - to sync **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: field_mapping_id - schema: - type: string - format: uuid - required: true - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '204': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/generate-key: - post: - operationId: generate_key_create - description: Create a remote key. - tags: - - generate-key - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKey' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/issues: - get: - operationId: issues_list - description: Gets all issues for Organization. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: account_token - schema: - type: string - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_date - schema: - type: string - description: If included, will only include issues whose most recent action - occurred before this time - - in: query - name: end_user_organization_name - schema: - type: string - - in: query - name: first_incident_time_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose first incident time - was after this datetime. - - in: query - name: first_incident_time_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose first incident time - was before this datetime. - - in: query - name: include_muted - schema: - type: string - description: If true, will include muted issues - - in: query - name: integration_name - schema: - type: string - - in: query - name: last_incident_time_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose last incident time - was after this datetime. - - in: query - name: last_incident_time_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose last incident time - was before this datetime. - - in: query - name: linked_account_id - schema: - type: string - description: If provided, will only include issues pertaining to the linked - account passed in. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: start_date - schema: - type: string - description: If included, will only include issues whose most recent action - occurred after this time - - in: query - name: status - schema: - type: string - enum: - - ONGOING - - RESOLVED - description: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - tags: - - issues - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedIssueList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/issues/{id}: - get: - operationId: issues_retrieve - description: Get a specific issue. - parameters: - - in: path - name: id - schema: - type: string - format: uuid - required: true - tags: - - issues - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Issue' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/leads: - get: - operationId: leads_list - description: Returns a list of `Lead` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: converted_account_id - schema: - type: string - description: If provided, will only return leads with this account. - examples: - ConvertedAccountId: - summary: converted_account_id - - in: query - name: converted_contact_id - schema: - type: string - description: If provided, will only return leads with this contact. - examples: - ConvertedContactId: - summary: converted_contact_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: email_addresses - schema: - type: string - description: If provided, will only return contacts matching the email addresses; - multiple email_addresses can be separated by commas. - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - converted_account - - converted_contact - - owner - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandOwner,ConvertedContact,ConvertedAccount: - value: owner,converted_contact,converted_account - summary: Expand Owner, Converted_contact, Converted_account - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: owner_id - schema: - type: string - description: If provided, will only return leads with this owner. - examples: - OwnerId: - summary: owner_id - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: phone_numbers - schema: - type: string - description: If provided, will only return contacts matching the phone numbers; - multiple phone numbers can be separated by commas. - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - leads - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedLeadList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: leads_create - description: Creates a `Lead` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - leads - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LeadEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/LeadEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/LeadEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/LeadResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/leads/{id}: - get: - operationId: leads_retrieve - description: Returns a `Lead` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - converted_account - - converted_contact - - owner - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandOwner,ConvertedContact,ConvertedAccount: - value: owner,converted_contact,converted_account - summary: Expand Owner, Converted_contact, Converted_account - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - leads - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Lead' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/leads/meta/post: - get: - operationId: leads_meta_post_retrieve - description: Returns metadata for `Lead` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - leads - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/leads/remote-field-classes: - get: - operationId: leads_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - leads - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/link-token: - post: - operationId: link_token_create - description: Creates a link token to be used when linking a new end user. - tags: - - link-token - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LinkToken' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/linked-account-scopes: - get: - operationId: linked_account_scopes_retrieve - description: Get all available permissions for Merge Common Models and fields - for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - scopes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: linked_account_scopes_create - description: Update permissions for any Common Model or field for a single Linked - Account. Any Scopes not set in this POST request will inherit the default - Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - scopes - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/linked-accounts: - get: - operationId: linked_accounts_list - description: List linked accounts for your organization. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: category - schema: - type: string - nullable: true - enum: - - accounting - - ats - - crm - - filestorage - - hris - - mktg - - ticketing - description: |- - Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` - - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_user_email_address - schema: - type: string - description: If provided, will only return linked accounts associated with - the given email address. - - in: query - name: end_user_organization_name - schema: - type: string - description: If provided, will only return linked accounts associated with - the given organization name. - - in: query - name: end_user_origin_id - schema: - type: string - description: If provided, will only return linked accounts associated with - the given origin ID. - - in: query - name: end_user_origin_ids - schema: - type: string - description: Comma-separated list of EndUser origin IDs, making it possible - to specify multiple EndUsers at once. - - in: query - name: id - schema: - type: string - format: uuid - - in: query - name: ids - schema: - type: string - description: Comma-separated list of LinkedAccount IDs, making it possible - to specify multiple LinkedAccounts at once. - - in: query - name: include_duplicates - schema: - type: boolean - description: If `true`, will include complete production duplicates of the - account specified by the `id` query parameter in the response. `id` must - be for a complete production linked account. - - in: query - name: integration_name - schema: - type: string - description: If provided, will only return linked accounts associated with - the given integration name. - - in: query - name: is_test_account - schema: - type: string - description: If included, will only include test linked accounts. If not included, - will only include non-test linked accounts. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: status - schema: - type: string - description: 'Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, - `RELINK_NEEDED`' - tags: - - linked-accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAccountDetailsAndActionsList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/notes: - get: - operationId: notes_list - description: Returns a list of `Note` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: account_id - schema: - type: string - description: If provided, will only return notes with this account. - examples: - AccountId: - summary: account_id - - in: query - name: contact_id - schema: - type: string - description: If provided, will only return notes with this contact. - examples: - ContactId: - summary: contact_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - contact - - opportunity - - owner - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandOwner,Contact,Account,Opportunity: - value: owner,contact,account,opportunity - summary: Expand Owner, Contact, Account, Opportunity - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: opportunity_id - schema: - type: string - description: If provided, will only return notes with this opportunity. - examples: - OpportunityId: - summary: opportunity_id - - in: query - name: owner_id - schema: - type: string - description: If provided, will only return notes with this owner. - examples: - OwnerId: - summary: owner_id - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - notes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedNoteList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: notes_create - description: Creates a `Note` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - notes - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NoteEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/NoteEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/NoteEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/NoteResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/notes/{id}: - get: - operationId: notes_retrieve - description: Returns a `Note` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - contact - - opportunity - - owner - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandOwner,Contact,Account,Opportunity: - value: owner,contact,account,opportunity - summary: Expand Owner, Contact, Account, Opportunity - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - notes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Note' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/notes/meta/post: - get: - operationId: notes_meta_post_retrieve - description: Returns metadata for `Note` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - notes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/notes/remote-field-classes: - get: - operationId: notes_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - notes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/opportunities: - get: - operationId: opportunities_list - description: Returns a list of `Opportunity` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: account_id - schema: - type: string - description: If provided, will only return opportunities with this account. - examples: - AccountId: - summary: account_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - owner - - stage - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandOwner,Stage,Account: - value: owner,stage,account - summary: Expand Owner, Stage, Account - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: owner_id - schema: - type: string - description: If provided, will only return opportunities with this owner. - examples: - OwnerId: - summary: owner_id - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_created_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return opportunities created in the third - party platform after this datetime. - - in: query - name: remote_fields - schema: - type: string - enum: - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: stage_id - schema: - type: string - description: If provided, will only return opportunities with this stage. - examples: - StageId: - summary: stage_id - - in: query - name: status - schema: - type: string - nullable: true - enum: - - LOST - - OPEN - - WON - description: |- - If provided, will only return opportunities with this status. Options: ('OPEN', 'WON', 'LOST') - - * `OPEN` - OPEN - * `WON` - WON - * `LOST` - LOST - tags: - - opportunities - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedOpportunityList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: opportunities_create - description: Creates an `Opportunity` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - opportunities - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpportunityEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/OpportunityEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/OpportunityEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/OpportunityResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/opportunities/{id}: - get: - operationId: opportunities_retrieve - description: Returns an `Opportunity` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - owner - - stage - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandOwner,Stage,Account: - value: owner,stage,account - summary: Expand Owner, Stage, Account - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - - in: query - name: show_enum_origins - schema: - type: string - enum: - - status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesStatus: - value: status - summary: Original Enum Values Status - tags: - - opportunities - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Opportunity' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - patch: - operationId: opportunities_partial_update - description: Updates an `Opportunity` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - opportunities - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedOpportunityEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedOpportunityEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedOpportunityEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/OpportunityResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/opportunities/meta/patch/{id}: - get: - operationId: opportunities_meta_patch_retrieve - description: Returns metadata for `Opportunity` PATCHs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - tags: - - opportunities - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-patch: META_PATCH - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/opportunities/meta/post: - get: - operationId: opportunities_meta_post_retrieve - description: Returns metadata for `Opportunity` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - opportunities - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/opportunities/remote-field-classes: - get: - operationId: opportunities_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - opportunities - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/passthrough: - post: - operationId: passthrough_create - description: Pull data from an endpoint not currently supported by Merge. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - passthrough - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/regenerate-key: - post: - operationId: regenerate_key_create - description: Exchange remote keys. - tags: - - regenerate-key - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKey' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/remote-fields: - get: - operationId: remote_fields_retrieve - description: Get all remote fields for a Linked Account. Remote fields are third-party - fields that are accessible after initial sync if remote_data is enabled. You - can use remote fields to override existing Merge fields or map a new Merge - field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: common_models - schema: - type: string - description: A comma seperated list of Common Model names. If included, will - only return Remote Fields for those Common Models. - - in: query - name: include_example_values - schema: - type: string - description: If true, will include example values, where available, for remote - fields in the 3rd party platform. These examples come from active data from - your customers. - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteFieldAPIResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/stages: - get: - operationId: stages_list - description: Returns a list of `Stage` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - stages - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedStageList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/stages/{id}: - get: - operationId: stages_retrieve - description: Returns a `Stage` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - stages - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Stage' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/stages/remote-field-classes: - get: - operationId: stages_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - stages - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/sync-status: - get: - operationId: sync_status_list - description: Get sync status for the current sync and the most recently finished - sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` - represents the most recent time any sync completed. These timestamps may correspond - to different sync instances which may result in a sync start time being later - than a separate sync completed time. To ensure you are retrieving the latest - available data reference the `last_sync_finished` timestamp where `last_sync_result` - is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, - `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about - sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - sync-status - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedSyncStatusList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/sync-status/resync: - post: - operationId: sync_status_resync_create - description: Force re-sync of all models. This endpoint is available for monthly, - quarterly, and highest sync frequency customers on the Professional or Enterprise - plans. Doing so will consume a sync credit for the relevant linked account. - Force re-syncs can also be triggered manually in the Merge Dashboard and is - available for all customers. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - force-resync - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SyncStatus' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/target-fields: - get: - operationId: target_fields_retrieve - description: Get all organization-wide Target Fields, this will not include - any Linked Account specific Target Fields. Organization-wide Target Fields - are additional fields appended to the Merge Common Model for all Linked Accounts - in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ExternalTargetFieldAPIResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/tasks: - get: - operationId: tasks_list - description: Returns a list of `Task` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - opportunity - - owner - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandOwner,Account,Opportunity: - value: owner,account,opportunity - summary: Expand Owner, Account, Opportunity - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - tasks - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedTaskList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: tasks_create - description: Creates a `Task` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - tasks - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TaskEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/TaskEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/TaskEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/TaskResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/tasks/{id}: - get: - operationId: tasks_retrieve - description: Returns a `Task` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - opportunity - - owner - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandOwner,Account,Opportunity: - value: owner,account,opportunity - summary: Expand Owner, Account, Opportunity - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - tasks - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - patch: - operationId: tasks_partial_update - description: Updates a `Task` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - tasks - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedTaskEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedTaskEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedTaskEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/TaskResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/tasks/meta/patch/{id}: - get: - operationId: tasks_meta_patch_retrieve - description: Returns metadata for `Task` PATCHs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - tags: - - tasks - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-patch: META_PATCH - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/tasks/meta/post: - get: - operationId: tasks_meta_post_retrieve - description: Returns metadata for `Task` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - tasks - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/tasks/remote-field-classes: - get: - operationId: tasks_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - tasks - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/users: - get: - operationId: users_list - description: Returns a list of `User` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: email - schema: - type: string - nullable: true - description: If provided, will only return users with this email. - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - users - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedUserList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/users/{id}: - get: - operationId: users_retrieve - description: Returns a `User` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - users - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /crm/v1/users/ignore/{model_id}: - post: - operationId: users_ignore_create - description: Ignores a specific row based on the `model_id` in the url. These - records will have their properties set to null, and will not be updated in - future syncs. The "reason" and "message" fields in the request body will be - stored for audit purposes. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: model_id - schema: - type: string - format: uuid - required: true - tags: - - users - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/IgnoreCommonModelRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/IgnoreCommonModelRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/IgnoreCommonModelRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - description: No response body - x-extra-tags: - - ignore-model - /crm/v1/users/remote-field-classes: - get: - operationId: users_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - users - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /crm/v1/webhook-receivers: - get: - operationId: webhook_receivers_list - description: Returns a list of `WebhookReceiver` objects. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - webhook-receivers - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/WebhookReceiver' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: webhook_receivers_create - description: Creates a `WebhookReceiver` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - webhook-receivers - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookReceiver' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC -components: - schemas: - Account: - type: object - description: |- - # The Account Object - ### Description - The `Account` object is used to represent a company in a CRM system. - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - owner: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The account's owner. - example: 0258cbc6-6020-430a-848e-aafacbadf4ae - x-merge-expands-to: User - name: - type: string - nullable: true - description: The account's name. - example: Merge API - description: - type: string - nullable: true - description: The account's description. - example: One API for all integrations - industry: - type: string - nullable: true - description: The account's industry. - example: API's - website: - type: string - format: uri - nullable: true - description: The account's website. - maxLength: 2000 - example: https://merge.dev/ - number_of_employees: - type: integer - maximum: 2147483647 - minimum: -2147483648 - nullable: true - description: The account's number of employees. - example: 276000 - addresses: - type: array - items: - $ref: '#/components/schemas/Address' - example: - - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - phone_numbers: - type: array - items: - $ref: '#/components/schemas/PhoneNumber' - readOnly: true - example: - - phone_number: '+16788879833' - phone_number_type: Mobile - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - last_activity_at: - type: string - format: date-time - nullable: true - description: The last date (either most recent or furthest in the future) - of when an activity occurs in an account. - example: '2022-02-10T00:00:00Z' - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the CRM system account data was last modified by a user - with a login. - example: '2022-01-09T00:00:00Z' - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's account was created. - example: '2021-11-10T00:00:00Z' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /accounts - data: - - Varies by platform - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-expands: '{"owner": "User"}' - x-merge-category: crm - AccountDetails: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - integration: - type: string - readOnly: true - example: BambooHR - integration_slug: - type: string - readOnly: true - example: bamboohr - category: - oneOf: - - $ref: '#/components/schemas/CategoryEnum' - - type: string - nullable: true - example: hris - end_user_origin_id: - type: string - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - end_user_organization_name: - type: string - readOnly: true - example: Waystar Royco - end_user_email_address: - type: string - format: email - readOnly: true - example: kendall.roy@waystar-royco.com - status: - type: string - readOnly: true - example: COMPLETE - webhook_listener_url: - type: string - format: uri - readOnly: true - example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: - type: boolean - nullable: true - readOnly: true - description: Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test Linked - Accounts, incomplete Production Linked Accounts, and ignored duplicate - Production Linked Account sets. - example: true - account_type: - type: string - readOnly: true - example: PRODUCTION - completed_at: - type: string - format: date-time - nullable: true - description: The time at which account completes the linking flow. - example: '2024-08-26T20:11:19.277118Z' - x-merge-category: crm - AccountDetailsAndActions: - type: object - description: |- - # The LinkedAccount Object - ### Description - The `LinkedAccount` object is used to represent an end user's link with a specific integration. - - ### Usage Example - View a list of your organization's `LinkedAccount` objects. - properties: - id: - type: string - example: e59b1821-f85c-4e28-a6b3-1804156f3563 - category: - oneOf: - - $ref: '#/components/schemas/CategoryEnum' - - type: string - example: hris - status: - oneOf: - - $ref: '#/components/schemas/AccountDetailsAndActionsStatusEnum' - - type: string - example: INCOMPLETE - status_detail: - type: string - example: Invalid login credentials - end_user_origin_id: - type: string - example: 3ac95cde-6c7f-4eef-afec-be710b42308d - end_user_organization_name: - type: string - example: Foo Bar, LLC - end_user_email_address: - type: string - example: hradmin@foobar.dev - subdomain: - type: string - description: The tenant or domain the customer has provided access to. - example: foobar - webhook_listener_url: - type: string - example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: - type: boolean - nullable: true - description: Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test Linked - Accounts, incomplete Production Linked Accounts, and ignored duplicate - Production Linked Account sets. - example: true - integration: - $ref: '#/components/schemas/AccountDetailsAndActionsIntegration' - example: - name: SAP SuccessFactors - categories: - - hris - - ats - image: https://cdn.merge.dev/SuccessFactors_Logo.png - square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg - color: '#F6A704' - slug: sap-successfactors - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - account_type: - type: string - example: PRODUCTION - completed_at: - type: string - format: date-time - example: '2024-08-26T20:11:19.277118Z' - required: - - account_type - - completed_at - - end_user_email_address - - end_user_organization_name - - id - - status - - webhook_listener_url - x-merge-sample-json: '{"id": "e59b1821-f85c-4e28-a6b3-1804156f3563", "category": - "hris", "status": "INCOMPLETE", "status_detail": "Invalid login credentials", - "end_user_origin_id": "3ac95cde-6c7f-4eef-afec-be710b42308d", "end_user_organization_name": - "Foo Bar, LLC", "end_user_email_address": "hradmin@foobar.dev", "webhook_listener_url": - "https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4", - "is_duplicate": true, "integration": {"name": "SAP SuccessFactors", "categories": - ["hris", "ats"], "image": "https://cdn.merge.dev/SuccessFactors_Logo.png", - "square_image": "https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg", "color": - "#F6A704", "slug": "sap-successfactors", "passthrough_available": true, "available_model_operations": - [{"model_name": "Candidate", "available_operations": ["FETCH", "CREATE"], - "required_post_parameters": ["remote_user_id"], "supported_fields": ["first_name", - "last_name", "company", "title"]}]}}' - x-merge-category: crm - AccountDetailsAndActionsIntegration: - type: object - properties: - name: - type: string - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - image: - type: string - square_image: - type: string - color: - type: string - slug: - type: string - passthrough_available: - type: boolean - available_model_operations: - type: array - items: - $ref: '#/components/schemas/ModelOperation' - required: - - categories - - color - - name - - passthrough_available - - slug - x-merge-category: crm - AccountDetailsAndActionsStatusEnum: - enum: - - COMPLETE - - INCOMPLETE - - RELINK_NEEDED - - IDLE - type: string - description: |- - * `COMPLETE` - COMPLETE - * `INCOMPLETE` - INCOMPLETE - * `RELINK_NEEDED` - RELINK_NEEDED - * `IDLE` - IDLE - x-merge-category: crm - AccountIntegration: - type: object - properties: - name: - type: string - description: Company name. - abbreviated_name: - type: string - nullable: true - description: "Optional. This shortened name appears in places with limited - space, usually in conjunction with the platform's logo (e.g., Merge Link - menu).

Example: Workforce Now (in lieu of ADP Workforce Now), - SuccessFactors (in lieu of SAP SuccessFactors)" - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - description: Category or categories this integration belongs to. Multiple - categories should be comma separated, i.e. [ats, hris]. - readOnly: true - image: - type: string - format: uri - nullable: true - description: Company logo in rectangular shape. - square_image: - type: string - format: uri - nullable: true - description: Company logo in square shape. - color: - type: string - description: The color of this integration used for buttons and text throughout - the app and landing pages. Choose a darker, saturated color. - pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ - maxLength: 18 - slug: - type: string - readOnly: true - api_endpoints_to_documentation_urls: - type: object - additionalProperties: {} - description: "Mapping of API endpoints to documentation urls for support. - Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', - 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], - 'POST': []}" - webhook_setup_guide_url: - type: string - nullable: true - description: Setup guide URL for third party webhook creation. Exposed in - Merge Docs. - category_beta_status: - type: object - description: Category or categories this integration is in beta status for. - readOnly: true - required: - - name - x-merge-category: crm - AccountRequest: - type: object - description: |- - # The Account Object - ### Description - The `Account` object is used to represent a company in a CRM system. - ### Usage Example - TODO - properties: - owner: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The account's owner. - example: 0258cbc6-6020-430a-848e-aafacbadf4ae - x-merge-expands-to: User - name: - type: string - nullable: true - description: The account's name. - example: Merge API - description: - type: string - nullable: true - description: The account's description. - example: One API for all integrations - industry: - type: string - nullable: true - description: The account's industry. - example: API's - website: - type: string - format: uri - nullable: true - description: The account's website. - maxLength: 2000 - example: https://merge.dev/ - number_of_employees: - type: integer - maximum: 2147483647 - minimum: -2147483648 - nullable: true - description: The account's number of employees. - example: 276000 - addresses: - type: array - items: - $ref: '#/components/schemas/AddressRequest' - example: - - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - last_activity_at: - type: string - format: date-time - nullable: true - description: The last date (either most recent or furthest in the future) - of when an activity occurs in an account. - example: '2022-02-10T00:00:00Z' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"owner": "User"}' - x-merge-category: crm - AccountToken: - type: object - properties: - account_token: - type: string - example: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB - integration: - $ref: '#/components/schemas/AccountIntegration' - example: - name: SAP SuccessFactors - categories: - - hris - - ats - image: https://cdn.merge.dev/SuccessFactors_Logo.png - square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg - color: '#F6A704' - slug: sap-successfactors - id: - type: string - example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - required: - - account_token - - id - - integration - x-merge-category: crm - ActivityTypeEnum: - enum: - - CALL - - MEETING - - EMAIL - type: string - description: |- - * `CALL` - CALL - * `MEETING` - MEETING - * `EMAIL` - EMAIL - x-merge-category: crm - Address: - type: object - description: |- - # The Address Object - ### Description - The `Address` object is used to represent an entity's address. - ### Usage Example - TODO - properties: - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - street_1: - type: string - nullable: true - description: Line 1 of the address's street. - example: 50 Bowling Green Dr - street_2: - type: string - nullable: true - description: Line 2 of the address's street. - example: Golden Gate Park - city: - type: string - nullable: true - description: The address's city. - example: San Francisco - state: - type: string - nullable: true - description: The address's state. - example: CA - postal_code: - type: string - nullable: true - description: The address's postal code. - example: '94122' - country: - oneOf: - - $ref: '#/components/schemas/CountryEnum' - - type: string - nullable: true - description: |- - The address's country. - - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - example: US - address_type: - oneOf: - - $ref: '#/components/schemas/AddressTypeEnum' - - type: string - nullable: true - description: |- - The address type. - - * `BILLING` - BILLING - * `SHIPPING` - SHIPPING - example: Shipping - x-merge-nested-write-allowed: true - x-merge-category: crm - AddressRequest: - type: object - description: |- - # The Address Object - ### Description - The `Address` object is used to represent an entity's address. - ### Usage Example - TODO - properties: - street_1: - type: string - nullable: true - description: Line 1 of the address's street. - example: 50 Bowling Green Dr - street_2: - type: string - nullable: true - description: Line 2 of the address's street. - example: Golden Gate Park - city: - type: string - nullable: true - description: The address's city. - example: San Francisco - state: - type: string - nullable: true - description: The address's state. - example: CA - postal_code: - type: string - nullable: true - description: The address's postal code. - example: '94122' - country: - oneOf: - - $ref: '#/components/schemas/CountryEnum' - - type: string - nullable: true - description: |- - The address's country. - - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - example: US - address_type: - oneOf: - - $ref: '#/components/schemas/AddressTypeEnum' - - type: string - nullable: true - description: |- - The address type. - - * `BILLING` - BILLING - * `SHIPPING` - SHIPPING - example: Shipping - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-category: crm - AddressTypeEnum: - enum: - - BILLING - - SHIPPING - type: string - description: |- - * `BILLING` - BILLING - * `SHIPPING` - SHIPPING - x-merge-category: crm - AdvancedMetadata: - type: object - properties: - id: - type: string - format: uuid - display_name: - type: string - description: - type: string - is_required: - type: boolean - is_custom: - type: boolean - field_choices: - type: array - items: {} - required: - - id - x-merge-category: crm - Association: - type: object - description: |- - # The Association Object - ### Description - The `Association` record refers to an instance of an Association Type. - ### Usage Example - TODO - properties: - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - source_object: - type: string - format: uuid - readOnly: true - example: a8f5d29f-4e50-473f-8f12-27128ffcd37a - target_object: - type: string - format: uuid - readOnly: true - example: da0b1963-be70-469c-9f8c-06a81d0fe759 - association_type: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/AssociationType' - nullable: true - description: The association type the association belongs to. - example: 88a71b5c-a3cc-4bce-84ff-d18b049a4081 - x-merge-expands-to: AssociationType - x-merge-expands: '{"association_type": "AssociationType"}' - x-merge-category: crm - AssociationSubType: - type: object - properties: - id: - type: string - nullable: true - readOnly: true - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - origin_type: - type: string - nullable: true - readOnly: true - x-merge-category: crm - AssociationType: - type: object - description: |- - # The AssociationType Object - ### Description - The `Association Type` object represents the relationship between two objects. - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 5bb73c32-3c6c-4757-ab7d-7d3540a1be31 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '93' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - source_object_class: - type: object - additionalProperties: {} - readOnly: true - description: The class of the source object (Custom Object or Common Model) - for the association type. - example: - id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 - origin_type: CUSTOM_OBJECT - target_object_classes: - type: array - items: - $ref: '#/components/schemas/AssociationSubType' - readOnly: true - example: - - id: Opportunity - origin_type: COMMON_MODEL - x-merge-expands-to: AssociationSubType - remote_key_name: - type: string - nullable: true - example: order_to_opportunity - display_name: - type: string - nullable: true - example: Order to Opportunity - cardinality: - oneOf: - - $ref: '#/components/schemas/CardinalityEnum' - - type: string - nullable: true - example: ONE_TO_MANY - is_required: - type: boolean - x-merge-expands: '{"target_object_classes": "AssociationSubType"}' - x-merge-category: crm - AssociationTypeRequestRequest: - type: object - properties: - source_object_class: - $ref: '#/components/schemas/ObjectClassDescriptionRequest' - target_object_classes: - type: array - items: - $ref: '#/components/schemas/ObjectClassDescriptionRequest' - x-merge-expands-to: AssociationSubType - remote_key_name: - type: string - minLength: 1 - display_name: - type: string - minLength: 1 - cardinality: - $ref: '#/components/schemas/CardinalityEnum' - is_required: - type: boolean - default: false - required: - - remote_key_name - - source_object_class - - target_object_classes - x-merge-expands: '{"target_object_classes": "AssociationSubType"}' - x-merge-category: crm - AsyncPassthroughReciept: - type: object - properties: - async_passthrough_receipt_id: - type: string - format: uuid - example: fd29020f-2695-445e-922e-dcd5e81903fd - required: - - async_passthrough_receipt_id - x-merge-category: crm - AuditLogEvent: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: b5ceea2a-7171-47ce-8090-165cfce5572c - user_name: - type: string - nullable: true - description: The User's full name at the time of this Event occurring. - maxLength: 200 - example: Gil Feig - user_email: - type: string - format: email - nullable: true - description: The User's email at the time of this Event occurring. - maxLength: 254 - example: hello@merge.dev - role: - oneOf: - - $ref: '#/components/schemas/RoleEnum' - - type: string - description: |- - Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. - - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - example: ADMIN - ip_address: - type: string - maxLength: 45 - example: 192.0.2.123 - event_type: - oneOf: - - $ref: '#/components/schemas/EventTypeEnum' - - type: string - description: |- - Designates the type of event that occurred. - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - * `INVITED_USER` - INVITED_USER - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - * `CREATED_DESTINATION` - CREATED_DESTINATION - * `DELETED_DESTINATION` - DELETED_DESTINATION - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - * `CHANGED_SCOPES` - CHANGED_SCOPES - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - * `RESET_PASSWORD` - RESET_PASSWORD - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - * `MUTED_ISSUE` - MUTED_ISSUE - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - example: CHANGED_SCOPES - event_description: - type: string - example: Organization-wide Scopes for model hris.Employee updated from Read - to Read+Write - created_at: - type: string - format: date-time - readOnly: true - required: - - event_description - - event_type - - ip_address - - role - x-merge-category: crm - AvailableActions: - type: object - description: |- - # The AvailableActions Object - ### Description - The `Activity` object is used to see all available model/operation combinations for an integration. - - ### Usage Example - Fetch all the actions available for the `Zenefits` integration. - properties: - integration: - $ref: '#/components/schemas/AccountIntegration' - example: - name: Lever - categories: - - ats - image: https://merge-api-production.s3.amazonaws.com/media/Lever_Logo.png - square_image: https://merge-api-production.s3.amazonaws.com/media/Lever_Square_Logo.png - color: '#262A34' - is_in_beta: 'true' - api_endpoints_to_documentation_urls: "{'GET': [('/common-model-scopes', - 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve')], - 'POST': []}" - passthrough_available: - type: boolean - example: true - available_model_operations: - type: array - items: - $ref: '#/components/schemas/ModelOperation' - example: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - required: - - integration - - passthrough_available - x-merge-category: crm - CRMAccountEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/AccountRequest' - required: - - model - x-merge-category: crm - CRMAccountResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Account' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: crm - CRMAssociationTypeEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/AssociationTypeRequestRequest' - required: - - model - x-merge-category: crm - CRMAssociationTypeResponse: - type: object - properties: - model: - $ref: '#/components/schemas/AssociationType' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: crm - CRMContactEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/ContactRequest' - required: - - model - x-merge-category: crm - CRMContactResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Contact' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: crm - CRMCustomObjectEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/CustomObjectRequest' - required: - - model - x-merge-category: crm - CRMCustomObjectResponse: - type: object - properties: - model: - $ref: '#/components/schemas/CustomObject' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: crm - CardinalityEnum: - enum: - - ONE_TO_ONE - - MANY_TO_ONE - - MANY_TO_MANY - - ONE_TO_MANY - type: string - description: |- - * `ONE_TO_ONE` - ONE_TO_ONE - * `MANY_TO_ONE` - MANY_TO_ONE - * `MANY_TO_MANY` - MANY_TO_MANY - * `ONE_TO_MANY` - ONE_TO_MANY - x-merge-category: crm - CategoriesEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - type: string - description: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - x-merge-category: crm - CategoryEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - type: string - description: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - x-merge-category: crm - CommonModelScopeAPI: - type: object - properties: - common_models: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializer' - description: The common models you want to update the scopes for - example: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - required: - - common_models - x-merge-category: crm - CommonModelScopesBodyRequest: - type: object - properties: - model_id: - type: string - minLength: 1 - example: hris.Employee - enabled_actions: - type: array - items: - $ref: '#/components/schemas/EnabledActionsEnum' - example: - - READ - - WRITE - disabled_fields: - type: array - items: - type: string - minLength: 1 - example: - - first_name - required: - - disabled_fields - - enabled_actions - - model_id - x-merge-category: crm - Contact: - type: object - description: |- - # The Contact Object - ### Description - The `Contact` object is used to represent an existing point of contact at a company in a CRM system. - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 550e8400-e29b-41d4-a716-446655440000 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - first_name: - type: string - nullable: true - description: The contact's first name. - example: Gil - last_name: - type: string - nullable: true - description: The contact's last name. - example: Feig - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The contact's account. - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - x-merge-expands-to: Account - owner: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The contact's owner. - example: b8fbfc30-0982-420e-8c20-dab07b70b9d6 - addresses: - type: array - items: - $ref: '#/components/schemas/Address' - example: - - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - email_addresses: - type: array - items: - $ref: '#/components/schemas/EmailAddress' - example: - - email_address: hello@merge.dev - email_address_type: Work - phone_numbers: - type: array - items: - $ref: '#/components/schemas/PhoneNumber' - example: - - phone_number: '+13785579223' - phone_number_type: Mobile - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - last_activity_at: - type: string - format: date-time - nullable: true - description: When the contact's last activity occurred. - example: '2022-02-10T00:00:00Z' - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's contact was created. - example: '2021-11-10T00:00:00Z' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /contacts - data: - - Varies by platform - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-expands: '{"account": "Account"}' - x-merge-category: crm - ContactRequest: - type: object - description: |- - # The Contact Object - ### Description - The `Contact` object is used to represent an existing point of contact at a company in a CRM system. - ### Usage Example - TODO - properties: - first_name: - type: string - nullable: true - description: The contact's first name. - example: Gil - last_name: - type: string - nullable: true - description: The contact's last name. - example: Feig - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The contact's account. - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - x-merge-expands-to: Account - owner: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The contact's owner. - example: b8fbfc30-0982-420e-8c20-dab07b70b9d6 - addresses: - type: array - items: - $ref: '#/components/schemas/AddressRequest' - example: - - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - email_addresses: - type: array - items: - $ref: '#/components/schemas/EmailAddressRequest' - example: - - email_address: hello@merge.dev - email_address_type: Work - phone_numbers: - type: array - items: - $ref: '#/components/schemas/PhoneNumberRequest' - example: - - phone_number: '+13785579223' - phone_number_type: Mobile - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - last_activity_at: - type: string - format: date-time - nullable: true - description: When the contact's last activity occurred. - example: '2022-02-10T00:00:00Z' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"account": "Account"}' - x-merge-category: crm - CountryEnum: - enum: - - AF - - AX - - AL - - DZ - - AS - - AD - - AO - - AI - - AQ - - AG - - AR - - AM - - AW - - AU - - AT - - AZ - - BS - - BH - - BD - - BB - - BY - - BE - - BZ - - BJ - - BM - - BT - - BO - - BQ - - BA - - BW - - BV - - BR - - IO - - BN - - BG - - BF - - BI - - CV - - KH - - CM - - CA - - KY - - CF - - TD - - CL - - CN - - CX - - CC - - CO - - KM - - CG - - CD - - CK - - CR - - CI - - HR - - CU - - CW - - CY - - CZ - - DK - - DJ - - DM - - DO - - EC - - EG - - SV - - GQ - - ER - - EE - - SZ - - ET - - FK - - FO - - FJ - - FI - - FR - - GF - - PF - - TF - - GA - - GM - - GE - - DE - - GH - - GI - - GR - - GL - - GD - - GP - - GU - - GT - - GG - - GN - - GW - - GY - - HT - - HM - - VA - - HN - - HK - - HU - - IS - - IN - - ID - - IR - - IQ - - IE - - IM - - IL - - IT - - JM - - JP - - JE - - JO - - KZ - - KE - - KI - - KW - - KG - - LA - - LV - - LB - - LS - - LR - - LY - - LI - - LT - - LU - - MO - - MG - - MW - - MY - - MV - - ML - - MT - - MH - - MQ - - MR - - MU - - YT - - MX - - FM - - MD - - MC - - MN - - ME - - MS - - MA - - MZ - - MM - - NA - - NR - - NP - - NL - - NC - - NZ - - NI - - NE - - NG - - NU - - NF - - KP - - MK - - MP - - NO - - OM - - PK - - PW - - PS - - PA - - PG - - PY - - PE - - PH - - PN - - PL - - PT - - PR - - QA - - RE - - RO - - RU - - RW - - BL - - SH - - KN - - LC - - MF - - PM - - VC - - WS - - SM - - ST - - SA - - SN - - RS - - SC - - SL - - SG - - SX - - SK - - SI - - SB - - SO - - ZA - - GS - - KR - - SS - - ES - - LK - - SD - - SR - - SJ - - SE - - CH - - SY - - TW - - TJ - - TZ - - TH - - TL - - TG - - TK - - TO - - TT - - TN - - TR - - TM - - TC - - TV - - UG - - UA - - AE - - GB - - UM - - US - - UY - - UZ - - VU - - VE - - VN - - VG - - VI - - WF - - EH - - YE - - ZM - - ZW - type: string - description: |- - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - x-merge-category: crm - CreateFieldMappingRequest: - type: object - properties: - target_field_name: - type: string - minLength: 1 - description: The name of the target field you want this remote field to - map to. - example: example_target_field_name - target_field_description: - type: string - minLength: 1 - description: The description of the target field you want this remote field - to map to. - example: this is a example description of the target field - remote_field_traversal_path: - type: array - items: {} - description: The field traversal path of the remote field listed when you - hit the GET /remote-fields endpoint. - example: - - example_remote_field - remote_method: - type: string - minLength: 1 - description: The method of the remote endpoint where the remote field is - coming from. - example: GET - remote_url_path: - type: string - minLength: 1 - description: The path of the remote endpoint where the remote field is coming - from. - example: /example-url-path - common_model_name: - type: string - minLength: 1 - description: The name of the Common Model that the remote field corresponds - to in a given category. - example: ExampleCommonModel - required: - - common_model_name - - remote_field_traversal_path - - remote_method - - remote_url_path - - target_field_description - - target_field_name - x-merge-category: crm - CustomObject: - type: object - description: |- - # The CustomObject Object - ### Description - The `Custom Object` record refers to an instance of a Custom Object Class. - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: da0b1963-be70-469c-9f8c-06a81d0fe759 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '4183634295' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - object_class: - type: string - format: uuid - nullable: true - description: The custom object class the custom object record belongs to. - example: ff1ff4cb-a66b-47dc-8e2a-50388049e602 - fields: - type: object - additionalProperties: {} - readOnly: true - description: The fields and values contained within the custom object record. - example: - order_id: '4183634295' - order_quantity: 50 - customer_type: Returning - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-category: crm - CustomObjectClass: - type: object - description: |- - # The Custom Object Class Object - ### Description - The `Custom Object Class` object is used to represent a Custom Object Schema in the remote system. - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: ff1ff4cb-a66b-47dc-8e2a-50388049e602 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '9579977' - created_at: - type: string - format: date-time - readOnly: true - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The custom object class's name. - example: order - description: - type: string - nullable: true - description: The custom object class's description. - example: Order object - labels: - type: object - additionalProperties: - type: string - nullable: true - readOnly: true - description: The custom object class's singular and plural labels. - example: - singular: Order - plural: Orders - fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldClassForCustomObjectClass' - readOnly: true - example: - - display_name: Order ID - remote_key_name: order_id - description: The unique ID for the order. - is_required: true - is_nested_list: false - field_type: string - field_format: string - field_choices: [] - item_schema: string - - display_name: Order Quantity - remote_key_name: order_quantity - description: The number of items ordered. - is_required: true - is_nested_list: false - field_type: number - field_format: number - field_choices: [] - item_schema: string - - display_name: Customer Type - remote_key_name: customer_type - description: The type of customer. - is_required: true - is_nested_list: false - field_type: string - field_format: enumeration - field_choices: - - New - - Returning - item_schema: - x-merge-expands-to: RemoteFieldClassForCustomObjectClass - association_types: - type: array - items: - type: object - additionalProperties: {} - nullable: true - readOnly: true - description: The types of associations with other models that the custom - object class can have. - x-merge-expands: '{"fields": "RemoteFieldClassForCustomObjectClass"}' - x-merge-category: crm - CustomObjectRequest: - type: object - properties: - fields: - type: object - additionalProperties: {} - example: - test_field: hello - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - required: - - fields - x-merge-category: crm - DataPassthroughRequest: - type: object - description: |- - # The DataPassthrough Object - ### Description - The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. - - ### Usage Example - Create a `DataPassthrough` to get team hierarchies from your Rippling integration. - properties: - method: - allOf: - - $ref: '#/components/schemas/MethodEnum' - example: POST - path: - type: string - minLength: 1 - description: The path of the request in the third party's platform. - example: /scooters - base_url_override: - type: string - nullable: true - minLength: 1 - description: An optional override of the third party's base url for the - request. - example: https://api.example.com - data: - type: string - nullable: true - minLength: 1 - description: The data with the request. You must include a `request_format` - parameter matching the data's format - example: '{"company": "Lime", "model": "Gen 2.5"}' - multipart_form_data: - type: array - items: - $ref: '#/components/schemas/MultipartFormFieldRequest' - nullable: true - description: Pass an array of `MultipartFormField` objects in here instead - of using the `data` param if `request_format` is set to `MULTIPART`. - headers: - type: object - additionalProperties: {} - nullable: true - description: The headers to use for the request (Merge will handle the account's - authorization headers). `Content-Type` header is required for passthrough. - Choose content type corresponding to expected format of receiving server. - example: - EXTRA-HEADER: value - request_format: - allOf: - - $ref: '#/components/schemas/RequestFormatEnum' - nullable: true - example: JSON - normalize_response: - type: boolean - description: 'Optional. If true, the response will always be an object of - the form `{"type": T, "value": ...}` where `T` will be one of `string, - boolean, number, null, array, object`.' - required: - - method - - path - x-merge-category: crm - DebugModeLog: - type: object - properties: - log_id: - type: string - example: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: - type: string - example: https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - $ref: '#/components/schemas/DebugModelLogSummary' - example: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - required: - - dashboard_view - - log_id - - log_summary - x-merge-sample-json: '{"log_id": "99433219-8017-4acd-bb3c-ceb23d663832", "dashboard_view": - "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832", "log_summary": - {"url": "www.exampleintegration.com/api/v1/exampleapi", "method": "POST", - "status_code": 200}}' - x-merge-category: crm - DebugModelLogSummary: - type: object - properties: - url: - type: string - example: www.exampleintegration.com/api/v1/exampleapi - method: - type: string - example: POST - status_code: - type: integer - example: 200 - required: - - method - - status_code - - url - x-merge-sample-json: '{"url": "www.exampleintegration.com/api/v1/exampleapi", - "method": "POST", "status_code": 200}' - x-merge-category: crm - DirectionEnum: - enum: - - INBOUND - - OUTBOUND - type: string - description: |- - * `INBOUND` - INBOUND - * `OUTBOUND` - OUTBOUND - x-merge-category: crm - EmailAddress: - type: object - description: |- - # The EmailAddress Object - ### Description - The `EmailAddress` object is used to represent an entity's email address. - ### Usage Example - Fetch from the `GET Contact` endpoint and view their email addresses. - properties: - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - email_address: - type: string - nullable: true - description: The email address. - example: merge_is_hiring@merge.dev - email_address_type: - type: string - nullable: true - description: The email address's type. - example: Work - x-merge-nested-write-allowed: true - x-merge-category: crm - EmailAddressRequest: - type: object - description: |- - # The EmailAddress Object - ### Description - The `EmailAddress` object is used to represent an entity's email address. - ### Usage Example - Fetch from the `GET Contact` endpoint and view their email addresses. - properties: - email_address: - type: string - nullable: true - description: The email address. - example: merge_is_hiring@merge.dev - email_address_type: - type: string - nullable: true - description: The email address's type. - example: Work - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-category: crm - EnabledActionsEnum: - enum: - - READ - - WRITE - type: string - description: |- - * `READ` - READ - * `WRITE` - WRITE - x-merge-category: crm - EncodingEnum: - enum: - - RAW - - BASE64 - - GZIP_BASE64 - type: string - description: |- - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - x-merge-category: crm - EndUserDetailsRequest: - type: object - properties: - end_user_email_address: - type: string - minLength: 1 - description: Your end user's email address. This is purely for identification - purposes - setting this value will not cause any emails to be sent. - maxLength: 100 - example: example@gmail.com - end_user_organization_name: - type: string - minLength: 1 - description: Your end user's organization. - maxLength: 100 - example: Test Organization - end_user_origin_id: - type: string - minLength: 1 - description: This unique identifier typically represents the ID for your - end user in your product's database. This value must be distinct from - other Linked Accounts' unique identifiers. - maxLength: 100 - example: '12345' - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - description: The integration categories to show in Merge Link. - example: - - hris - - ats - integration: - type: string - nullable: true - minLength: 1 - description: The slug of a specific pre-selected integration for this linking - flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. - example: bamboohr - link_expiry_mins: - type: integer - maximum: 10080 - minimum: 30 - default: 30 - description: An integer number of minutes between [30, 720 or 10080 if for - a Magic Link URL] for how long this token is valid. Defaults to 30. - should_create_magic_link_url: - type: boolean - nullable: true - default: false - description: Whether to generate a Magic Link URL. Defaults to false. For - more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - hide_admin_magic_link: - type: boolean - nullable: true - default: false - description: Whether to generate a Magic Link URL on the Admin Needed screen - during the linking flow. Defaults to false. For more information on Magic - Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - common_models: - type: array - items: - $ref: '#/components/schemas/CommonModelScopesBodyRequest' - nullable: true - description: An array of objects to specify the models and fields that will - be disabled for a given Linked Account. Each object uses model_id, enabled_actions, - and disabled_fields to specify the model, method, and fields that are - scoped for a given Linked Account. - category_common_model_scopes: - type: object - additionalProperties: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' - nullable: true - description: When creating a Link Token, you can set permissions for Common - Models that will apply to the account that is going to be linked. Any - model or field not specified in link token payload will default to existing - settings. - example: - hris: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - field_permissions: - enabled_fields: - - first_name - - last_name - - personal_email - disabled_fields: - - preferred_name - - model_name: Employment - model_permissions: - READ: - is_enabled: false - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - effective_date - ats: - - model_name: Job - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - field_permissions: - enabled_fields: - - name - disabled_fields: - - description - - model_name: Department - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - language: - oneOf: - - $ref: '#/components/schemas/LanguageEnum' - - type: string - nullable: true - description: |- - The following subset of IETF language tags can be used to configure localization. - - * `en` - en - * `de` - de - example: en - are_syncs_disabled: - type: boolean - nullable: true - default: false - description: The boolean that indicates whether initial, periodic, and force - syncs will be disabled. - integration_specific_config: - type: object - additionalProperties: {} - nullable: true - description: A JSON object containing integration-specific configuration - options. - example: - rippling: - oauth_code: 3h1jj8ssdf31dfji3o1jjdfjasd - required: - - categories - - end_user_email_address - - end_user_organization_name - - end_user_origin_id - x-merge-category: crm - Engagement: - type: object - description: |- - # The Engagement Object - ### Description - The `Engagement` object is used to represent an interaction noted in a CRM system. - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 550e8400-e29b-41d4-a716-446655440000 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - owner: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The engagement's owner. - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - x-merge-expands-to: User - content: - type: string - nullable: true - description: The engagement's content. - example: Call for negotiation - subject: - type: string - nullable: true - description: The engagement's subject. - example: Call from customer - direction: - oneOf: - - $ref: '#/components/schemas/DirectionEnum' - - type: string - nullable: true - description: |- - The engagement's direction. - - * `INBOUND` - INBOUND - * `OUTBOUND` - OUTBOUND - example: INBOUND - engagement_type: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/EngagementType' - nullable: true - description: The engagement type of the engagement. - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - x-merge-expands-to: EngagementType - start_time: - type: string - format: date-time - nullable: true - description: The time at which the engagement started. - example: '2022-02-10T00:00:00Z' - end_time: - type: string - format: date-time - nullable: true - description: The time at which the engagement ended. - example: '2022-02-10T00:05:00Z' - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The account of the engagement. - example: 025fjlc6-6000-430a-848e-aafacbadf4fe - x-merge-expands-to: Account - contacts: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - example: - - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg - x-merge-expands-to: Contact - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /engagements - data: - - Varies by platform - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-expands: '{"account": "Account", "contacts": "Contact", "engagement_type": - "EngagementType", "owner": "User"}' - x-merge-category: crm - EngagementEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/EngagementRequest' - required: - - model - x-merge-category: crm - EngagementRequest: - type: object - description: |- - # The Engagement Object - ### Description - The `Engagement` object is used to represent an interaction noted in a CRM system. - ### Usage Example - TODO - properties: - owner: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The engagement's owner. - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - x-merge-expands-to: User - content: - type: string - nullable: true - description: The engagement's content. - example: Call for negotiation - subject: - type: string - nullable: true - description: The engagement's subject. - example: Call from customer - direction: - oneOf: - - $ref: '#/components/schemas/DirectionEnum' - - type: string - nullable: true - description: |- - The engagement's direction. - - * `INBOUND` - INBOUND - * `OUTBOUND` - OUTBOUND - example: INBOUND - engagement_type: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/EngagementType' - nullable: true - description: The engagement type of the engagement. - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - x-merge-expands-to: EngagementType - start_time: - type: string - format: date-time - nullable: true - description: The time at which the engagement started. - example: '2022-02-10T00:00:00Z' - end_time: - type: string - format: date-time - nullable: true - description: The time at which the engagement ended. - example: '2022-02-10T00:05:00Z' - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The account of the engagement. - example: 025fjlc6-6000-430a-848e-aafacbadf4fe - x-merge-expands-to: Account - contacts: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - example: - - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg - x-merge-expands-to: Contact - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"account": "Account", "contacts": "Contact", "engagement_type": - "EngagementType", "owner": "User"}' - x-merge-category: crm - EngagementResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Engagement' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: crm - EngagementType: - type: object - description: |- - # The Engagement Type Object - ### Description - The `Engagement Type` object is used to represent an interaction activity. A given `Engagement` typically has an `Engagement Type` object represented in the engagement_type field. - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 550e8400-e29b-41d4-a716-446655440000 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - activity_type: - oneOf: - - $ref: '#/components/schemas/ActivityTypeEnum' - - type: string - nullable: true - description: |- - The engagement type's activity type. - - * `CALL` - CALL - * `MEETING` - MEETING - * `EMAIL` - EMAIL - example: CALL - name: - type: string - nullable: true - description: The engagement type's name. - example: First Call - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-category: crm - ErrorValidationProblem: - type: object - properties: - source: - $ref: '#/components/schemas/ValidationProblemSource' - example: - pointer: /model/custom_fields - title: - type: string - example: Missing Required Field - detail: - type: string - example: custom_fields is a required field on model. - problem_type: - type: string - example: MISSING_REQUIRED_FIELD - required: - - detail - - problem_type - - title - x-merge-category: crm - EventTypeEnum: - enum: - - CREATED_REMOTE_PRODUCTION_API_KEY - - DELETED_REMOTE_PRODUCTION_API_KEY - - CREATED_TEST_API_KEY - - DELETED_TEST_API_KEY - - REGENERATED_PRODUCTION_API_KEY - - REGENERATED_WEBHOOK_SIGNATURE - - INVITED_USER - - TWO_FACTOR_AUTH_ENABLED - - TWO_FACTOR_AUTH_DISABLED - - DELETED_LINKED_ACCOUNT - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - CREATED_DESTINATION - - DELETED_DESTINATION - - CHANGED_DESTINATION - - CHANGED_SCOPES - - CHANGED_PERSONAL_INFORMATION - - CHANGED_ORGANIZATION_SETTINGS - - ENABLED_INTEGRATION - - DISABLED_INTEGRATION - - ENABLED_CATEGORY - - DISABLED_CATEGORY - - CHANGED_PASSWORD - - RESET_PASSWORD - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - FORCED_LINKED_ACCOUNT_RESYNC - - MUTED_ISSUE - - GENERATED_MAGIC_LINK - - ENABLED_MERGE_WEBHOOK - - DISABLED_MERGE_WEBHOOK - - MERGE_WEBHOOK_TARGET_CHANGED - - END_USER_CREDENTIALS_ACCESSED - type: string - description: |- - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - * `INVITED_USER` - INVITED_USER - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - * `CREATED_DESTINATION` - CREATED_DESTINATION - * `DELETED_DESTINATION` - DELETED_DESTINATION - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - * `CHANGED_SCOPES` - CHANGED_SCOPES - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - * `RESET_PASSWORD` - RESET_PASSWORD - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - * `MUTED_ISSUE` - MUTED_ISSUE - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - x-merge-category: crm - ExternalTargetFieldAPI: - type: object - properties: - name: - type: string - nullable: true - readOnly: true - example: example_target_field_name - description: - type: string - nullable: true - readOnly: true - example: this is a example description of a target field - is_mapped: - type: string - nullable: true - readOnly: true - example: true - x-merge-category: crm - ExternalTargetFieldAPIResponse: - type: object - properties: - Account: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Contact: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Lead: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Note: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Opportunity: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Stage: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - User: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Task: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Engagement: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - x-merge-category: crm - FieldFormatEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - type: string - description: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - x-merge-category: crm - FieldMappingApiInstance: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: - type: boolean - readOnly: true - target_field: - type: object - properties: - name: - type: string - description: - type: string - is_organization_wide: - type: boolean - required: - - description - - is_organization_wide - - name - nullable: true - readOnly: true - example: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - type: object - properties: - remote_key_name: - type: string - nullable: true - schema: - type: object - additionalProperties: {} - nullable: true - remote_endpoint_info: - type: object - properties: - method: - type: string - nullable: true - url_path: - type: string - nullable: true - field_traversal_path: - type: array - items: - type: string - nullable: true - required: - - field_traversal_path - - method - - url_path - required: - - remote_endpoint_info - - remote_key_name - - schema - nullable: true - readOnly: true - example: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - x-merge-category: crm - FieldMappingApiInstanceResponse: - type: object - properties: - Account: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Contact: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Lead: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Note: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Opportunity: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Stage: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - User: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Task: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Engagement: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - x-merge-category: crm - FieldMappingInstanceResponse: - type: object - properties: - model: - $ref: '#/components/schemas/FieldMappingApiInstance' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: crm - FieldPermissionDeserializer: - type: object - properties: - enabled_fields: - type: array - items: {} - disabled_fields: - type: array - items: {} - x-merge-category: crm - FieldPermissionDeserializerRequest: - type: object - properties: - enabled_fields: - type: array - items: {} - disabled_fields: - type: array - items: {} - x-merge-category: crm - FieldTypeEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - type: string - description: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - x-merge-category: crm - GenerateRemoteKeyRequest: - type: object - description: |- - # The GenerateRemoteKey Object - ### Description - The `GenerateRemoteKey` object is used to represent a request for a new remote key. - - ### Usage Example - Post a `GenerateRemoteKey` to create a new remote key. - properties: - name: - type: string - minLength: 1 - description: The name of the remote key - example: Remote Deployment Key 1 - required: - - name - x-merge-category: crm - IgnoreCommonModelRequest: - type: object - properties: - reason: - oneOf: - - $ref: '#/components/schemas/ReasonEnum' - - type: string - example: GENERAL_CUSTOMER_REQUEST - message: - type: string - minLength: 1 - maxLength: 256 - example: deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39 - required: - - reason - x-merge-category: crm - IndividualCommonModelScopeDeserializer: - type: object - properties: - model_name: - type: string - model_permissions: - type: object - additionalProperties: - $ref: '#/components/schemas/ModelPermissionDeserializer' - field_permissions: - $ref: '#/components/schemas/FieldPermissionDeserializer' - required: - - model_name - x-merge-category: crm - IndividualCommonModelScopeDeserializerRequest: - type: object - properties: - model_name: - type: string - minLength: 1 - model_permissions: - type: object - additionalProperties: - $ref: '#/components/schemas/ModelPermissionDeserializerRequest' - field_permissions: - $ref: '#/components/schemas/FieldPermissionDeserializerRequest' - required: - - model_name - x-merge-category: crm - Issue: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: - oneOf: - - $ref: '#/components/schemas/IssueStatusEnum' - - type: string - description: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - example: ONGOING - error_description: - type: string - example: Missing Permissions - end_user: - type: object - additionalProperties: {} - readOnly: true - example: b82302de-852e-4e60-b050-edf9da3b7c02 - first_incident_time: - type: string - format: date-time - nullable: true - example: '2022-12-05T16:19:15.161Z' - last_incident_time: - type: string - format: date-time - nullable: true - example: '2022-12-05T16:19:15.161Z' - is_muted: - type: boolean - readOnly: true - example: true - error_details: - type: array - items: - type: string - readOnly: true - example: - - Missing employee permissions. - - Missing time off permissions. - required: - - error_description - x-merge-category: crm - IssueStatusEnum: - enum: - - ONGOING - - RESOLVED - type: string - description: |- - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - x-merge-category: crm - ItemFormatEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - type: string - description: |- - * `string` - uuid - * `number` - url - * `date` - email - * `datetime` - phone - * `bool` - currency - * `list` - decimal - x-merge-category: crm - ItemSchema: - type: object - properties: - item_type: - $ref: '#/components/schemas/ItemTypeEnum' - item_format: - $ref: '#/components/schemas/ItemFormatEnum' - item_choices: - type: array - items: - type: string - x-merge-category: crm - ItemTypeEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - type: string - description: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - x-merge-category: crm - LanguageEnum: - enum: - - en - - de - type: string - description: |- - * `en` - en - * `de` - de - x-merge-category: crm - LastSyncResultEnum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - type: string - description: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - x-merge-category: crm - Lead: - type: object - description: |- - # The Lead Object - ### Description - The `Lead` object is used to represent an individual who is a potential customer. - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 550e8400-e29b-41d4-a716-446655440000 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - owner: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The lead's owner. - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - x-merge-expands-to: User - lead_source: - type: string - nullable: true - description: The lead's source. - example: API Blogger - title: - type: string - nullable: true - description: The lead's title. - example: Co-Founder - company: - type: string - nullable: true - description: The lead's company. - example: Merge API - first_name: - type: string - nullable: true - description: The lead's first name. - example: Gil - last_name: - type: string - nullable: true - description: The lead's last name. - example: Feig - addresses: - type: array - items: - $ref: '#/components/schemas/Address' - readOnly: true - example: - - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - email_addresses: - type: array - items: - $ref: '#/components/schemas/EmailAddress' - readOnly: true - example: - - email_address: hello@merge.dev - email_address_type: Work - phone_numbers: - type: array - items: - $ref: '#/components/schemas/PhoneNumber' - readOnly: true - example: - - phone_number: '+16789932455' - phone_number_type: Mobile - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's lead was updated. - example: '2022-02-10T00:00:00Z' - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's lead was created. - example: '2021-11-10T00:00:00Z' - converted_date: - type: string - format: date-time - nullable: true - description: When the lead was converted. - example: '2022-03-10T00:00:00Z' - converted_contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The contact of the converted lead. - example: 025fjlc6-6000-430a-848e-aafacbadf4fe - x-merge-expands-to: Contact - converted_account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The account of the converted lead. - example: 9c9de072-29cf-48e3-9578-1ca5b145b40e - x-merge-expands-to: Account - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /leads - data: - - Varies by platform - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-expands: '{"converted_account": "Account", "converted_contact": "Contact", - "owner": "User"}' - x-merge-category: crm - LeadEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/LeadRequest' - required: - - model - x-merge-category: crm - LeadRequest: - type: object - description: |- - # The Lead Object - ### Description - The `Lead` object is used to represent an individual who is a potential customer. - ### Usage Example - TODO - properties: - owner: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The lead's owner. - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - x-merge-expands-to: User - lead_source: - type: string - nullable: true - description: The lead's source. - example: API Blogger - title: - type: string - nullable: true - description: The lead's title. - example: Co-Founder - company: - type: string - nullable: true - description: The lead's company. - example: Merge API - first_name: - type: string - nullable: true - description: The lead's first name. - example: Gil - last_name: - type: string - nullable: true - description: The lead's last name. - example: Feig - addresses: - type: array - items: - $ref: '#/components/schemas/AddressRequest' - example: - - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - email_addresses: - type: array - items: - $ref: '#/components/schemas/EmailAddressRequest' - example: - - email_address: hello@merge.dev - email_address_type: Work - phone_numbers: - type: array - items: - $ref: '#/components/schemas/PhoneNumberRequest' - example: - - phone_number: '+16789932455' - phone_number_type: Mobile - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - converted_date: - type: string - format: date-time - nullable: true - description: When the lead was converted. - example: '2022-03-10T00:00:00Z' - converted_contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The contact of the converted lead. - example: 025fjlc6-6000-430a-848e-aafacbadf4fe - x-merge-expands-to: Contact - converted_account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The account of the converted lead. - example: 9c9de072-29cf-48e3-9578-1ca5b145b40e - x-merge-expands-to: Account - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"converted_account": "Account", "converted_contact": "Contact", - "owner": "User"}' - x-merge-category: crm - LeadResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Lead' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: crm - LinkToken: - type: object - properties: - link_token: - type: string - example: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 - integration_name: - type: string - example: Lever - magic_link_url: - type: string - example: https://link.merge.dev/asdfjkl12345jsndfgi2i83n - required: - - link_token - x-merge-category: crm - LinkedAccountCommonModelScopeDeserializerRequest: - type: object - properties: - common_models: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' - description: The common models you want to update the scopes for - example: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - home_location - disabled_fields: - - work_location - - model_name: Benefit - model_permissions: - WRITE: - is_enabled: false - required: - - common_models - x-merge-category: crm - LinkedAccountStatus: - type: object - properties: - linked_account_status: - type: string - can_make_request: - type: boolean - required: - - can_make_request - - linked_account_status - x-merge-category: crm - MetaResponse: - type: object - properties: - request_schema: - type: object - additionalProperties: {} - example: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - type: object - additionalProperties: {} - status: - $ref: '#/components/schemas/LinkedAccountStatus' - example: - linked_account_status: COMPLETE - can_make_request: true - has_conditional_params: - type: boolean - has_required_linked_account_params: - type: boolean - required: - - has_conditional_params - - has_required_linked_account_params - - request_schema - x-merge-category: crm - MethodEnum: - enum: - - GET - - OPTIONS - - HEAD - - POST - - PUT - - PATCH - - DELETE - type: string - description: |- - * `GET` - GET - * `OPTIONS` - OPTIONS - * `HEAD` - HEAD - * `POST` - POST - * `PUT` - PUT - * `PATCH` - PATCH - * `DELETE` - DELETE - x-merge-category: crm - ModelOperation: - type: object - description: |- - # The ModelOperation Object - ### Description - The `ModelOperation` object is used to represent the operations that are currently supported for a given model. - - ### Usage Example - View what operations are supported for the `Candidate` endpoint. - properties: - model_name: - type: string - example: Candidate - available_operations: - type: array - items: - type: string - example: - - FETCH - - CREATE - required_post_parameters: - type: array - items: - type: string - example: - - remote_user_id - supported_fields: - type: array - items: - type: string - example: - - first_name - - last_name - - company - - title - required: - - available_operations - - model_name - - required_post_parameters - - supported_fields - x-merge-category: crm - ModelPermissionDeserializer: - type: object - properties: - is_enabled: - type: boolean - x-merge-category: crm - ModelPermissionDeserializerRequest: - type: object - properties: - is_enabled: - type: boolean - x-merge-category: crm - MultipartFormFieldRequest: - type: object - description: |- - # The MultipartFormField Object - ### Description - The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. - - ### Usage Example - Create a `MultipartFormField` to define a multipart form entry. - properties: - name: - type: string - minLength: 1 - description: The name of the form field - example: resume - data: - type: string - minLength: 1 - description: The data for the form field. - example: SW50ZWdyYXRlIGZhc3QKSW50ZWdyYXRlIG9uY2U= - encoding: - oneOf: - - $ref: '#/components/schemas/EncodingEnum' - - type: string - nullable: true - default: RAW - description: |- - The encoding of the value of `data`. Defaults to `RAW` if not defined. - - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - example: BASE64 - file_name: - type: string - nullable: true - minLength: 1 - description: The file name of the form field, if the field is for a file. - example: resume.pdf - content_type: - type: string - nullable: true - minLength: 1 - description: The MIME type of the file, if the field is for a file. - example: application/pdf - required: - - data - - name - x-merge-category: crm - Note: - type: object - description: |- - # The Note Object - ### Description - The `Note` object is used to represent a note on another object. - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 550e8400-e29b-41d4-a716-446655440000 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - owner: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The note's owner. - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - x-merge-expands-to: User - content: - type: string - nullable: true - description: The note's content. - example: Merge is hiring! - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The note's contact. - example: 025fjlc6-6000-430a-848e-aafacbadf4fe - x-merge-expands-to: Contact - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The note's account. - example: fba1fbc6-67c0-4cb2-a176-7896acd2ffd5 - x-merge-expands-to: Account - opportunity: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Opportunity' - nullable: true - description: The note's opportunity. - example: 754a244e-dd67-4731-a8d3-9bff9dc10465 - x-merge-expands-to: Opportunity - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's lead was updated. - example: '2022-02-10T00:00:00Z' - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's lead was created. - example: '2021-11-10T00:00:00Z' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /notes - data: - - Varies by platform - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-expands: '{"account": "Account", "contact": "Contact", "opportunity": - "Opportunity", "owner": "User"}' - x-merge-category: crm - NoteEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/NoteRequest' - required: - - model - x-merge-category: crm - NoteRequest: - type: object - description: |- - # The Note Object - ### Description - The `Note` object is used to represent a note on another object. - ### Usage Example - TODO - properties: - owner: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The note's owner. - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - x-merge-expands-to: User - content: - type: string - nullable: true - description: The note's content. - example: Merge is hiring! - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The note's contact. - example: 025fjlc6-6000-430a-848e-aafacbadf4fe - x-merge-expands-to: Contact - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The note's account. - example: fba1fbc6-67c0-4cb2-a176-7896acd2ffd5 - x-merge-expands-to: Account - opportunity: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Opportunity' - nullable: true - description: The note's opportunity. - example: 754a244e-dd67-4731-a8d3-9bff9dc10465 - x-merge-expands-to: Opportunity - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"account": "Account", "contact": "Contact", "opportunity": - "Opportunity", "owner": "User"}' - x-merge-category: crm - NoteResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Note' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: crm - ObjectClassDescriptionRequest: - type: object - properties: - id: - type: string - minLength: 1 - origin_type: - $ref: '#/components/schemas/OriginTypeEnum' - required: - - id - - origin_type - x-merge-category: crm - Opportunity: - type: object - description: |- - # The Opportunity Object - ### Description - The `Opportunity` object is used to represent a deal opportunity in a CRM system. - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 550e8400-e29b-41d4-a716-446655440000 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The opportunity's name. - example: Needs Integrations - description: - type: string - nullable: true - description: The opportunity's description. - example: Needs a Unified API for Integrations! - amount: - type: integer - maximum: 2147483647 - minimum: -2147483648 - nullable: true - description: The opportunity's amount. - example: 100000 - owner: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The opportunity's owner. - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - x-merge-expands-to: User - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The account of the opportunity. - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - x-merge-expands-to: Account - stage: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Stage' - nullable: true - description: The stage of the opportunity. - example: 1968cbc6-6040-430a-848e-aafacbadf4ad - x-merge-expands-to: Stage - status: - oneOf: - - $ref: '#/components/schemas/OpportunityStatusEnum' - - type: string - nullable: true - description: |- - The opportunity's status. - - * `OPEN` - OPEN - * `WON` - WON - * `LOST` - LOST - example: WON - last_activity_at: - type: string - format: date-time - nullable: true - description: When the opportunity's last activity occurred. - example: '2022-02-10T00:00:00Z' - close_date: - type: string - format: date-time - nullable: true - description: When the opportunity was closed. - example: '2022-02-10T00:00:00Z' - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's opportunity was created. - example: '2021-11-10T00:00:00Z' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /opportunities - data: - - Varies by platform - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-expands: '{"account": "Account", "owner": "User", "stage": "Stage"}' - x-merge-category: crm - OpportunityEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/OpportunityRequest' - required: - - model - x-merge-category: crm - OpportunityRequest: - type: object - description: |- - # The Opportunity Object - ### Description - The `Opportunity` object is used to represent a deal opportunity in a CRM system. - ### Usage Example - TODO - properties: - name: - type: string - nullable: true - description: The opportunity's name. - example: Needs Integrations - description: - type: string - nullable: true - description: The opportunity's description. - example: Needs a Unified API for Integrations! - amount: - type: integer - maximum: 2147483647 - minimum: -2147483648 - nullable: true - description: The opportunity's amount. - example: 100000 - owner: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The opportunity's owner. - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - x-merge-expands-to: User - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The account of the opportunity. - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - x-merge-expands-to: Account - stage: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Stage' - nullable: true - description: The stage of the opportunity. - example: 1968cbc6-6040-430a-848e-aafacbadf4ad - x-merge-expands-to: Stage - status: - oneOf: - - $ref: '#/components/schemas/OpportunityStatusEnum' - - type: string - nullable: true - description: |- - The opportunity's status. - - * `OPEN` - OPEN - * `WON` - WON - * `LOST` - LOST - example: WON - last_activity_at: - type: string - format: date-time - nullable: true - description: When the opportunity's last activity occurred. - example: '2022-02-10T00:00:00Z' - close_date: - type: string - format: date-time - nullable: true - description: When the opportunity was closed. - example: '2022-02-10T00:00:00Z' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"account": "Account", "owner": "User", "stage": "Stage"}' - x-merge-category: crm - OpportunityResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Opportunity' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: crm - OpportunityStatusEnum: - enum: - - OPEN - - WON - - LOST - type: string - description: |- - * `OPEN` - OPEN - * `WON` - WON - * `LOST` - LOST - x-merge-category: crm - OriginTypeEnum: - enum: - - CUSTOM_OBJECT - - COMMON_MODEL - - REMOTE_ONLY_MODEL - type: string - description: |- - * `CUSTOM_OBJECT` - CUSTOM_OBJECT - * `COMMON_MODEL` - COMMON_MODEL - * `REMOTE_ONLY_MODEL` - REMOTE_ONLY_MODEL - x-merge-category: crm - PaginatedAccountDetailsAndActionsList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/AccountDetailsAndActions' - x-merge-category: crm - PaginatedAccountList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Account' - x-merge-category: crm - PaginatedAssociationList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Association' - x-merge-category: crm - PaginatedAssociationTypeList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/AssociationType' - x-merge-category: crm - PaginatedAuditLogEventList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/AuditLogEvent' - x-merge-category: crm - PaginatedContactList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Contact' - x-merge-category: crm - PaginatedCustomObjectClassList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/CustomObjectClass' - x-merge-category: crm - PaginatedCustomObjectList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/CustomObject' - x-merge-category: crm - PaginatedEngagementList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Engagement' - x-merge-category: crm - PaginatedEngagementTypeList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/EngagementType' - x-merge-category: crm - PaginatedIssueList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Issue' - x-merge-category: crm - PaginatedLeadList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Lead' - x-merge-category: crm - PaginatedNoteList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Note' - x-merge-category: crm - PaginatedOpportunityList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Opportunity' - x-merge-category: crm - PaginatedRemoteFieldClassList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/RemoteFieldClass' - x-merge-category: crm - PaginatedStageList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Stage' - x-merge-category: crm - PaginatedSyncStatusList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/SyncStatus' - x-merge-category: crm - PaginatedTaskList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Task' - x-merge-category: crm - PaginatedUserList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/User' - x-merge-category: crm - PatchedAccountRequest: - type: object - description: |- - # The Account Object - ### Description - The `Account` object is used to represent a company in a CRM system. - ### Usage Example - TODO - properties: - owner: - type: string - format: uuid - nullable: true - description: The account's owner. - example: 0258cbc6-6020-430a-848e-aafacbadf4ae - name: - type: string - nullable: true - description: The account's name. - example: Merge API - description: - type: string - nullable: true - description: The account's description. - example: One API for all integrations - industry: - type: string - nullable: true - description: The account's industry. - example: API's - website: - type: string - format: uri - nullable: true - description: The account's website. - maxLength: 2000 - example: https://merge.dev/ - number_of_employees: - type: integer - maximum: 2147483647 - minimum: -2147483648 - nullable: true - description: The account's number of employees. - example: 276000 - addresses: - type: array - items: - $ref: '#/components/schemas/AddressRequest' - example: - - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - last_activity_at: - type: string - format: date-time - nullable: true - description: The last date (either most recent or furthest in the future) - of when an activity occurs in an account. - example: '2022-02-10T00:00:00Z' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-category: crm - PatchedCRMAccountEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/PatchedAccountRequest' - required: - - model - x-merge-category: crm - PatchedCRMContactEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/PatchedContactRequest' - required: - - model - x-merge-category: crm - PatchedContactRequest: - type: object - description: |- - # The Contact Object - ### Description - The `Contact` object is used to represent an existing point of contact at a company in a CRM system. - ### Usage Example - TODO - properties: - first_name: - type: string - nullable: true - description: The contact's first name. - example: Gil - last_name: - type: string - nullable: true - description: The contact's last name. - example: Feig - account: - type: string - format: uuid - nullable: true - description: The contact's account. - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - owner: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The contact's owner. - example: b8fbfc30-0982-420e-8c20-dab07b70b9d6 - addresses: - type: array - items: - $ref: '#/components/schemas/AddressRequest' - example: - - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - email_addresses: - type: array - items: - $ref: '#/components/schemas/EmailAddressRequest' - example: - - email_address: hello@merge.dev - email_address_type: Work - phone_numbers: - type: array - items: - $ref: '#/components/schemas/PhoneNumberRequest' - example: - - phone_number: '+13785579223' - phone_number_type: Mobile - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - last_activity_at: - type: string - format: date-time - nullable: true - description: When the contact's last activity occurred. - example: '2022-02-10T00:00:00Z' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-category: crm - PatchedEditFieldMappingRequest: - type: object - properties: - remote_field_traversal_path: - type: array - items: {} - description: The field traversal path of the remote field listed when you - hit the GET /remote-fields endpoint. - example: - - example_remote_field_name - remote_method: - type: string - minLength: 1 - description: The method of the remote endpoint where the remote field is - coming from. - example: GET - remote_url_path: - type: string - minLength: 1 - description: The path of the remote endpoint where the remote field is coming - from. - example: /example-url-path - x-merge-category: crm - PatchedEngagementEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/PatchedEngagementRequest' - required: - - model - x-merge-category: crm - PatchedEngagementRequest: - type: object - description: |- - # The Engagement Object - ### Description - The `Engagement` object is used to represent an interaction noted in a CRM system. - ### Usage Example - TODO - properties: - owner: - type: string - format: uuid - nullable: true - description: The engagement's owner. - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - content: - type: string - nullable: true - description: The engagement's content. - example: Call for negotiation - subject: - type: string - nullable: true - description: The engagement's subject. - example: Call from customer - direction: - oneOf: - - $ref: '#/components/schemas/DirectionEnum' - - type: string - nullable: true - description: |- - The engagement's direction. - - * `INBOUND` - INBOUND - * `OUTBOUND` - OUTBOUND - example: INBOUND - engagement_type: - type: string - format: uuid - nullable: true - description: The engagement type of the engagement. - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - start_time: - type: string - format: date-time - nullable: true - description: The time at which the engagement started. - example: '2022-02-10T00:00:00Z' - end_time: - type: string - format: date-time - nullable: true - description: The time at which the engagement ended. - example: '2022-02-10T00:05:00Z' - account: - type: string - format: uuid - nullable: true - description: The account of the engagement. - example: 025fjlc6-6000-430a-848e-aafacbadf4fe - contacts: - type: array - items: - type: string - format: uuid - nullable: true - example: - - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-category: crm - PatchedOpportunityEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/PatchedOpportunityRequest' - required: - - model - x-merge-category: crm - PatchedOpportunityRequest: - type: object - description: |- - # The Opportunity Object - ### Description - The `Opportunity` object is used to represent a deal opportunity in a CRM system. - ### Usage Example - TODO - properties: - name: - type: string - nullable: true - description: The opportunity's name. - example: Needs Integrations - description: - type: string - nullable: true - description: The opportunity's description. - example: Needs a Unified API for Integrations! - amount: - type: integer - maximum: 2147483647 - minimum: -2147483648 - nullable: true - description: The opportunity's amount. - example: 100000 - owner: - type: string - format: uuid - nullable: true - description: The opportunity's owner. - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - account: - type: string - format: uuid - nullable: true - description: The account of the opportunity. - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - stage: - type: string - format: uuid - nullable: true - description: The stage of the opportunity. - example: 1968cbc6-6040-430a-848e-aafacbadf4ad - status: - oneOf: - - $ref: '#/components/schemas/OpportunityStatusEnum' - - type: string - nullable: true - description: |- - The opportunity's status. - - * `OPEN` - OPEN - * `WON` - WON - * `LOST` - LOST - example: WON - last_activity_at: - type: string - format: date-time - nullable: true - description: When the opportunity's last activity occurred. - example: '2022-02-10T00:00:00Z' - close_date: - type: string - format: date-time - nullable: true - description: When the opportunity was closed. - example: '2022-02-10T00:00:00Z' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-category: crm - PatchedTaskEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/PatchedTaskRequest' - required: - - model - x-merge-category: crm - PatchedTaskRequest: - type: object - description: |- - # The Task Object - ### Description - The `Task` object is used to represent a task, such as a to-do item. - ### Usage Example - TODO - properties: - subject: - type: string - nullable: true - description: The task's subject. - example: Contact about Integration Strategy - content: - type: string - nullable: true - description: The task's content. - example: Follow up to see whether they need integrations - owner: - type: string - format: uuid - nullable: true - description: The task's owner. - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - account: - type: string - format: uuid - nullable: true - description: The task's account. - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - opportunity: - type: string - format: uuid - nullable: true - description: The task's opportunity. - example: 550e8400-e29b-41d4-a716-446655440000 - completed_date: - type: string - format: date-time - nullable: true - description: When the task is completed. - example: '2022-02-11T00:00:00Z' - due_date: - type: string - format: date-time - nullable: true - description: When the task is due. - example: '2022-02-10T00:00:00Z' - status: - oneOf: - - $ref: '#/components/schemas/TaskStatusEnum' - - type: string - nullable: true - description: |- - The task's status. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - example: OPEN - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-category: crm - PhoneNumber: - type: object - description: |- - # The PhoneNumber Object - ### Description - The `PhoneNumber` object is used to represent an entity's phone number. - ### Usage Example - Fetch from the `GET Contact` endpoint and view their phone numbers. - properties: - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - phone_number: - type: string - nullable: true - description: The phone number. - example: '+3198675309' - phone_number_type: - type: string - nullable: true - description: The phone number's type. - example: Mobile - x-merge-nested-write-allowed: true - x-merge-category: crm - PhoneNumberRequest: - type: object - description: |- - # The PhoneNumber Object - ### Description - The `PhoneNumber` object is used to represent an entity's phone number. - ### Usage Example - Fetch from the `GET Contact` endpoint and view their phone numbers. - properties: - phone_number: - type: string - nullable: true - description: The phone number. - example: '+3198675309' - phone_number_type: - type: string - nullable: true - description: The phone number's type. - example: Mobile - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-category: crm - ReasonEnum: - enum: - - GENERAL_CUSTOMER_REQUEST - - GDPR - - OTHER - type: string - description: |- - * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST - * `GDPR` - GDPR - * `OTHER` - OTHER - x-merge-category: crm - RemoteData: - type: object - description: |- - # The RemoteData Object - ### Description - The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. - - ### Usage Example - TODO - properties: - path: - type: string - description: The third-party API path that is being called. - example: /platform-endpoint - data: - readOnly: true - description: The data returned from the third-party for this object in its - original, unnormalized format. - example: - - Varies by platform - required: - - path - x-merge-category: crm - RemoteEndpointInfo: - type: object - properties: - method: - type: string - example: GET - url_path: - type: string - example: /example-url-path - field_traversal_path: - type: array - items: {} - example: - - example_key_name - required: - - field_traversal_path - - method - - url_path - x-merge-category: crm - RemoteField: - type: object - properties: - remote_field_class: - oneOf: - - type: string - - $ref: '#/components/schemas/RemoteFieldClass' - x-merge-expands-to: RemoteFieldClass - value: - nullable: true - example: string - required: - - remote_field_class - x-merge-expands: '{"remote_field_class": "RemoteFieldClass"}' - x-merge-category: crm - RemoteFieldAPI: - type: object - properties: - schema: - type: object - additionalProperties: {} - example: - type: string - remote_key_name: - type: string - example: example_remote_key_name - remote_endpoint_info: - $ref: '#/components/schemas/RemoteEndpointInfo' - example: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - type: array - items: {} - nullable: true - example: - - example - advanced_metadata: - allOf: - - $ref: '#/components/schemas/AdvancedMetadata' - nullable: true - coverage: - oneOf: - - type: integer - - type: number - format: double - nullable: true - readOnly: true - example: 0.33 - required: - - advanced_metadata - - remote_endpoint_info - - remote_key_name - - schema - x-merge-category: crm - RemoteFieldAPIResponse: - type: object - properties: - Account: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Contact: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Lead: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Note: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Opportunity: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Stage: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - User: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Task: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Engagement: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - x-merge-category: crm - RemoteFieldClass: - type: object - properties: - id: - type: string - display_name: - type: string - remote_key_name: - type: string - description: - type: string - is_custom: - type: boolean - is_required: - type: boolean - field_type: - $ref: '#/components/schemas/FieldTypeEnum' - field_format: - $ref: '#/components/schemas/FieldFormatEnum' - field_choices: - type: array - items: - type: object - properties: - value: - nullable: true - display_name: - type: string - nullable: true - nullable: true - item_schema: - $ref: '#/components/schemas/ItemSchema' - x-merge-category: crm - RemoteFieldClassForCustomObjectClass: - type: object - properties: - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - display_name: - type: string - nullable: true - remote_key_name: - type: string - nullable: true - description: - type: string - nullable: true - is_required: - type: boolean - field_type: - oneOf: - - $ref: '#/components/schemas/FieldTypeEnum' - - type: string - readOnly: true - field_format: - oneOf: - - $ref: '#/components/schemas/FieldFormatEnum' - - type: string - readOnly: true - field_choices: - type: array - items: - type: object - properties: - value: - nullable: true - display_name: - type: string - nullable: true - nullable: true - readOnly: true - item_schema: - type: object - properties: - item_type: - type: string - nullable: true - item_format: - type: string - nullable: true - item_choices: - type: array - items: - type: string - nullable: true - nullable: true - required: - - item_choices - - item_format - - item_type - nullable: true - readOnly: true - x-merge-category: crm - RemoteFieldRequest: - type: object - properties: - remote_field_class: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/RemoteFieldClass' - example: b057d1d2-c204-4da8-a74c-c91d1a260614 - x-merge-expands-to: RemoteFieldClass - value: - nullable: true - example: string - required: - - remote_field_class - x-merge-expands: '{"remote_field_class": "RemoteFieldClass"}' - x-merge-category: crm - RemoteKey: - type: object - description: |- - # The RemoteKey Object - ### Description - The `RemoteKey` object is used to represent a request for a new remote key. - - ### Usage Example - Post a `GenerateRemoteKey` to receive a new `RemoteKey`. - properties: - name: - type: string - example: Remote Deployment Key 1 - key: - type: string - example: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - required: - - key - - name - x-merge-category: crm - RemoteKeyForRegenerationRequest: - type: object - description: |- - # The RemoteKeyForRegeneration Object - ### Description - The `RemoteKeyForRegeneration` object is used to exchange an old remote key for a new one - - ### Usage Example - Post a `RemoteKeyForRegeneration` to swap out an old remote key for a new one - properties: - name: - type: string - minLength: 1 - description: The name of the remote key - example: Remote Deployment Key 1 - required: - - name - x-merge-category: crm - RemoteResponse: - type: object - description: |- - # The RemoteResponse Object - ### Description - The `RemoteResponse` object is used to represent information returned from a third-party endpoint. - - ### Usage Example - View the `RemoteResponse` returned from your `DataPassthrough`. - properties: - method: - type: string - example: GET - path: - type: string - example: /scooters - status: - type: integer - example: 200 - response: - example: - scooters: - - company: Lime - model: Gen 2.5 - - company: Bird - model: Bird Zero - response_headers: - type: object - additionalProperties: {} - example: - X-Page-Token: value - response_type: - oneOf: - - $ref: '#/components/schemas/ResponseTypeEnum' - - type: string - example: JSON - headers: - type: object - additionalProperties: {} - example: - EXTRA-HEADER: value - Authorization: - required: - - method - - path - - response - - status - x-merge-category: crm - RequestFormatEnum: - enum: - - JSON - - XML - - MULTIPART - type: string - description: |- - * `JSON` - JSON - * `XML` - XML - * `MULTIPART` - MULTIPART - x-merge-category: crm - ResponseTypeEnum: - enum: - - JSON - - BASE64_GZIP - type: string - description: |- - * `JSON` - JSON - * `BASE64_GZIP` - BASE64_GZIP - x-merge-category: crm - RoleEnum: - enum: - - ADMIN - - DEVELOPER - - MEMBER - - API - - SYSTEM - - MERGE_TEAM - type: string - description: |- - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - x-merge-category: crm - SelectiveSyncConfigurationsUsageEnum: - enum: - - IN_NEXT_SYNC - - IN_LAST_SYNC - type: string - description: |- - * `IN_NEXT_SYNC` - IN_NEXT_SYNC - * `IN_LAST_SYNC` - IN_LAST_SYNC - x-merge-category: crm - Stage: - type: object - description: |- - # The Stage Object - ### Description - The `Stage` object is used to represent the stage of an opportunity. - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The stage's name. - example: Closed Won - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /stages - data: - - Varies by platform - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-category: crm - StatusFd5Enum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - type: string - description: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - x-merge-category: crm - SyncStatus: - type: object - description: |- - # The SyncStatus Object - ### Description - The `SyncStatus` object is used to represent the syncing state of an account - - ### Usage Example - View the `SyncStatus` for an account to see how recently its models were synced. - properties: - model_name: - type: string - example: Account - model_id: - type: string - example: crm.Account - last_sync_start: - type: string - format: date-time - example: '2021-03-30T19:44:18.695973Z' - next_sync_start: - type: string - format: date-time - example: '2021-03-30T20:44:18.662942Z' - last_sync_result: - oneOf: - - $ref: '#/components/schemas/LastSyncResultEnum' - - type: string - example: DONE - last_sync_finished: - type: string - format: date-time - example: '2021-03-30T19:55:18.695973Z' - status: - oneOf: - - $ref: '#/components/schemas/StatusFd5Enum' - - type: string - example: SYNCING - is_initial_sync: - type: boolean - example: true - selective_sync_configurations_usage: - $ref: '#/components/schemas/SelectiveSyncConfigurationsUsageEnum' - required: - - is_initial_sync - - model_id - - model_name - - status - x-merge-sample-json: '{"model_name": "Candidate", "model_id": "ats.Candidate", - "last_sync_start": "2021-03-30T19:44:18.695973Z", "next_sync_start": "2021-03-30T20:44:18.662942Z", - "status": "SYNCING", "is_initial_sync": true}' - x-merge-category: crm - Task: - type: object - description: |- - # The Task Object - ### Description - The `Task` object is used to represent a task, such as a to-do item. - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 550e8400-e29b-41d4-a716-446655440000 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - subject: - type: string - nullable: true - description: The task's subject. - example: Contact about Integration Strategy - content: - type: string - nullable: true - description: The task's content. - example: Follow up to see whether they need integrations - owner: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The task's owner. - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - x-merge-expands-to: User - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The task's account. - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - x-merge-expands-to: Account - opportunity: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Opportunity' - nullable: true - description: The task's opportunity. - example: 550e8400-e29b-41d4-a716-446655440000 - x-merge-expands-to: Opportunity - completed_date: - type: string - format: date-time - nullable: true - description: When the task is completed. - example: '2022-02-11T00:00:00Z' - due_date: - type: string - format: date-time - nullable: true - description: When the task is due. - example: '2022-02-10T00:00:00Z' - status: - oneOf: - - $ref: '#/components/schemas/TaskStatusEnum' - - type: string - nullable: true - description: |- - The task's status. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - example: OPEN - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /tasks - data: - - Varies by platform - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-expands: '{"account": "Account", "opportunity": "Opportunity", "owner": - "User"}' - x-merge-category: crm - TaskEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/TaskRequest' - required: - - model - x-merge-category: crm - TaskRequest: - type: object - description: |- - # The Task Object - ### Description - The `Task` object is used to represent a task, such as a to-do item. - ### Usage Example - TODO - properties: - subject: - type: string - nullable: true - description: The task's subject. - example: Contact about Integration Strategy - content: - type: string - nullable: true - description: The task's content. - example: Follow up to see whether they need integrations - owner: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The task's owner. - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - x-merge-expands-to: User - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The task's account. - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - x-merge-expands-to: Account - opportunity: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Opportunity' - nullable: true - description: The task's opportunity. - example: 550e8400-e29b-41d4-a716-446655440000 - x-merge-expands-to: Opportunity - completed_date: - type: string - format: date-time - nullable: true - description: When the task is completed. - example: '2022-02-11T00:00:00Z' - due_date: - type: string - format: date-time - nullable: true - description: When the task is due. - example: '2022-02-10T00:00:00Z' - status: - oneOf: - - $ref: '#/components/schemas/TaskStatusEnum' - - type: string - nullable: true - description: |- - The task's status. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - example: OPEN - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"account": "Account", "opportunity": "Opportunity", "owner": - "User"}' - x-merge-category: crm - TaskResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Task' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: crm - TaskStatusEnum: - enum: - - OPEN - - CLOSED - type: string - description: |- - * `OPEN` - OPEN - * `CLOSED` - CLOSED - x-merge-category: crm - User: - type: object - description: |- - # The User Object - ### Description - The `User` object is used to represent a user with a login to the CRM system. - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 0358cbc6-2040-430a-848e-aafacbadf3aa - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The user's name. - example: Gil Feig - email: - type: string - nullable: true - description: The user's email address. - example: merge_is_hiring@merge.dev - is_active: - type: boolean - nullable: true - description: Whether or not the user is active. - example: true - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /users - data: - - Varies by platform - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-expands: '{"roles": "Role", "teams": "Team"}' - x-merge-category: crm - ValidationProblemSource: - type: object - properties: - pointer: - type: string - required: - - pointer - x-merge-category: crm - WarningValidationProblem: - type: object - properties: - source: - $ref: '#/components/schemas/ValidationProblemSource' - example: - pointer: /age - title: - type: string - example: Unrecognized Field - detail: - type: string - example: An unrecognized field, age, was passed in with request data. - problem_type: - type: string - example: UNRECOGNIZED_FIELD - required: - - detail - - problem_type - - title - x-merge-category: crm - WebhookReceiver: - type: object - properties: - event: - type: string - is_active: - type: boolean - key: - type: string - required: - - event - - is_active - x-merge-category: crm - WebhookReceiverRequest: - type: object - properties: - event: - type: string - minLength: 1 - is_active: - type: boolean - key: - type: string - minLength: 1 - required: - - event - - is_active - x-merge-category: crm - securitySchemes: - tokenAuth: - type: http - scheme: bearer - description: Token-based authentication with required prefix "Bearer" - x-fern-token-variable-name: api_key -servers: -- url: https://api.merge.dev/api/crm/v1 - description: Production - x-fern-server-name: Production -- url: https://api-sandbox.merge.dev/api/crm/v1 - description: Sandbox - x-fern-server-name: Sandbox -- url: https://api-eu.merge.dev/api/crm/v1 - description: Production EU - x-fern-server-name: ProductionEU -- url: https://api-ap.merge.dev/api/crm/v1 - description: Production APSE1 - x-fern-server-name: ProductionAPSE1 diff --git a/.mock/definition/ATS/__package__.yml b/.mock/definition/ATS/__package__.yml deleted file mode 100644 index 791d099f4..000000000 --- a/.mock/definition/ATS/__package__.yml +++ /dev/null @@ -1,4734 +0,0 @@ -types: - AccessRoleEnum: - enum: - - SUPER_ADMIN - - ADMIN - - TEAM_MEMBER - - LIMITED_TEAM_MEMBER - - INTERVIEWER - docs: |- - * `SUPER_ADMIN` - SUPER_ADMIN - * `ADMIN` - ADMIN - * `TEAM_MEMBER` - TEAM_MEMBER - * `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER - * `INTERVIEWER` - INTERVIEWER - source: - openapi: ats_v3.yml - AccountDetailsCategory: - discriminated: false - union: - - CategoryEnum - - string - source: - openapi: ats_v3.yml - inline: true - AccountDetails: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - integration: - type: optional - access: read-only - integration_slug: - type: optional - access: read-only - category: optional - end_user_origin_id: - type: optional - access: read-only - end_user_organization_name: - type: optional - access: read-only - end_user_email_address: - type: optional - validation: - format: email - access: read-only - status: - type: optional - access: read-only - webhook_listener_url: - type: optional - validation: - format: uri - access: read-only - is_duplicate: - type: optional - docs: >- - Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test - Linked Accounts, incomplete Production Linked Accounts, and ignored - duplicate Production Linked Account sets. - access: read-only - account_type: - type: optional - access: read-only - completed_at: - type: optional - docs: The time at which account completes the linking flow. - source: - openapi: ats_v3.yml - AccountDetailsAndActionsCategory: - discriminated: false - union: - - CategoryEnum - - string - source: - openapi: ats_v3.yml - inline: true - AccountDetailsAndActionsStatus: - discriminated: false - union: - - AccountDetailsAndActionsStatusEnum - - string - source: - openapi: ats_v3.yml - inline: true - AccountDetailsAndActions: - docs: >- - # The LinkedAccount Object - - ### Description - - The `LinkedAccount` object is used to represent an end user's link with a - specific integration. - - - ### Usage Example - - View a list of your organization's `LinkedAccount` objects. - properties: - id: string - category: optional - status: AccountDetailsAndActionsStatus - status_detail: optional - end_user_origin_id: optional - end_user_organization_name: string - end_user_email_address: string - subdomain: - type: optional - docs: The tenant or domain the customer has provided access to. - webhook_listener_url: string - is_duplicate: - type: optional - docs: >- - Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test - Linked Accounts, incomplete Production Linked Accounts, and ignored - duplicate Production Linked Account sets. - integration: optional - account_type: string - completed_at: datetime - source: - openapi: ats_v3.yml - AccountDetailsAndActionsIntegration: - properties: - name: string - categories: list - image: optional - square_image: optional - color: string - slug: string - passthrough_available: boolean - available_model_operations: optional> - source: - openapi: ats_v3.yml - AccountDetailsAndActionsStatusEnum: - enum: - - COMPLETE - - INCOMPLETE - - RELINK_NEEDED - - IDLE - docs: |- - * `COMPLETE` - COMPLETE - * `INCOMPLETE` - INCOMPLETE - * `RELINK_NEEDED` - RELINK_NEEDED - * `IDLE` - IDLE - source: - openapi: ats_v3.yml - AccountIntegration: - properties: - name: - type: string - docs: Company name. - abbreviated_name: - type: optional - docs: >- - Optional. This shortened name appears in places with limited space, - usually in conjunction with the platform's logo (e.g., Merge Link - menu).

Example: Workforce Now (in lieu of ADP Workforce - Now), SuccessFactors (in lieu of SAP SuccessFactors) - categories: - type: optional> - docs: >- - Category or categories this integration belongs to. Multiple - categories should be comma separated, i.e. [ats, hris]. - access: read-only - image: - type: optional - docs: Company logo in rectangular shape. - validation: - format: uri - square_image: - type: optional - docs: Company logo in square shape. - validation: - format: uri - color: - type: optional - docs: >- - The color of this integration used for buttons and text throughout the - app and landing pages. Choose a darker, saturated color. - validation: - pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ - maxLength: 18 - slug: - type: optional - access: read-only - api_endpoints_to_documentation_urls: - type: optional> - docs: >- - Mapping of API endpoints to documentation urls for support. Example: - {'GET': [['/common-model-scopes', - 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', - 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], - 'POST': []} - webhook_setup_guide_url: - type: optional - docs: >- - Setup guide URL for third party webhook creation. Exposed in Merge - Docs. - category_beta_status: - type: optional> - docs: Category or categories this integration is in beta status for. - access: read-only - source: - openapi: ats_v3.yml - AccountToken: - properties: - account_token: string - integration: AccountIntegration - id: string - source: - openapi: ats_v3.yml - ActivityUser: - discriminated: false - docs: The user that performed the action. - union: - - type: string - validation: - format: uuid - - RemoteUser - source: - openapi: ats_v3.yml - inline: true - ActivityActivityType: - discriminated: false - docs: |- - The activity's type. - - * `NOTE` - NOTE - * `EMAIL` - EMAIL - * `OTHER` - OTHER - union: - - ActivityTypeEnum - - string - source: - openapi: ats_v3.yml - inline: true - ActivityVisibility: - discriminated: false - docs: |- - The activity's visibility. - - * `ADMIN_ONLY` - ADMIN_ONLY - * `PUBLIC` - PUBLIC - * `PRIVATE` - PRIVATE - union: - - VisibilityEnum - - string - source: - openapi: ats_v3.yml - inline: true - Activity: - docs: >- - # The Activity Object - - ### Description - - The `Activity` object is used to represent an activity for a candidate - performed by a user. - - ### Usage Example - - Fetch from the `LIST Activities` endpoint and filter by `ID` to show all - activities. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - user: - type: optional - docs: The user that performed the action. - remote_created_at: - type: optional - docs: When the third party's activity was created. - activity_type: - type: optional - docs: |- - The activity's type. - - * `NOTE` - NOTE - * `EMAIL` - EMAIL - * `OTHER` - OTHER - subject: - type: optional - docs: The activity's subject. - body: - type: optional - docs: The activity's body. - visibility: - type: optional - docs: |- - The activity's visibility. - - * `ADMIN_ONLY` - ADMIN_ONLY - * `PUBLIC` - PUBLIC - * `PRIVATE` - PRIVATE - candidate: - type: optional - validation: - format: uuid - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ats_v3.yml - ActivityRequestUser: - discriminated: false - docs: The user that performed the action. - union: - - type: string - validation: - format: uuid - - RemoteUser - source: - openapi: ats_v3.yml - inline: true - ActivityRequestVisibility: - discriminated: false - docs: |- - The activity's visibility. - - * `ADMIN_ONLY` - ADMIN_ONLY - * `PUBLIC` - PUBLIC - * `PRIVATE` - PRIVATE - union: - - VisibilityEnum - - string - source: - openapi: ats_v3.yml - inline: true - ActivityRequest: - docs: >- - # The Activity Object - - ### Description - - The `Activity` object is used to represent an activity for a candidate - performed by a user. - - ### Usage Example - - Fetch from the `LIST Activities` endpoint and filter by `ID` to show all - activities. - properties: - user: - type: optional - docs: The user that performed the action. - activity_type: - type: optional - docs: |- - The activity's type. - - * `NOTE` - NOTE - * `EMAIL` - EMAIL - * `OTHER` - OTHER - subject: - type: optional - docs: The activity's subject. - body: - type: optional - docs: The activity's body. - visibility: - type: optional - docs: |- - The activity's visibility. - - * `ADMIN_ONLY` - ADMIN_ONLY - * `PUBLIC` - PUBLIC - * `PRIVATE` - PRIVATE - candidate: - type: optional - validation: - format: uuid - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: ats_v3.yml - ActivityResponse: - properties: - model: Activity - warnings: list - errors: list - logs: optional> - source: - openapi: ats_v3.yml - ActivityTypeEnum: - enum: - - NOTE - - EMAIL - - OTHER - docs: |- - * `NOTE` - NOTE - * `EMAIL` - EMAIL - * `OTHER` - OTHER - source: - openapi: ats_v3.yml - AdvancedMetadata: - properties: - id: - type: string - validation: - format: uuid - display_name: optional - description: optional - is_required: optional - is_custom: optional - field_choices: optional> - source: - openapi: ats_v3.yml - ApplicationCandidate: - discriminated: false - docs: The candidate applying. - union: - - type: string - validation: - format: uuid - - Candidate - source: - openapi: ats_v3.yml - inline: true - ApplicationJob: - discriminated: false - docs: The job being applied for. - union: - - type: string - validation: - format: uuid - - Job - source: - openapi: ats_v3.yml - inline: true - ApplicationOffersItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Offer - source: - openapi: ats_v3.yml - inline: true - ApplicationCreditedTo: - discriminated: false - docs: The user credited for this application. - union: - - type: string - validation: - format: uuid - - RemoteUser - source: - openapi: ats_v3.yml - inline: true - ApplicationScreeningQuestionAnswersItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - ScreeningQuestionAnswer - source: - openapi: ats_v3.yml - inline: true - ApplicationCurrentStage: - discriminated: false - docs: The application's current stage. - union: - - type: string - validation: - format: uuid - - JobInterviewStage - source: - openapi: ats_v3.yml - inline: true - ApplicationRejectReason: - discriminated: false - docs: The application's reason for rejection. - union: - - type: string - validation: - format: uuid - - RejectReason - source: - openapi: ats_v3.yml - inline: true - Application: - docs: >- - # The Application Object - - ### Description - - The Application Object is used to represent a candidate's journey through - a particular Job's recruiting process. If a Candidate applies for multiple - Jobs, there will be a separate Application for each Job if the third-party - integration allows it. - - - ### Usage Example - - Fetch from the `LIST Applications` endpoint and filter by `ID` to show all - applications. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - candidate: - type: optional - docs: The candidate applying. - job: - type: optional - docs: The job being applied for. - applied_at: - type: optional - docs: When the application was submitted. - rejected_at: - type: optional - docs: When the application was rejected. - offers: optional>> - source: - type: optional - docs: The application's source. - credited_to: - type: optional - docs: The user credited for this application. - screening_question_answers: optional> - current_stage: - type: optional - docs: The application's current stage. - reject_reason: - type: optional - docs: The application's reason for rejection. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ats_v3.yml - ApplicationRequestCandidate: - discriminated: false - docs: The candidate applying. - union: - - type: string - validation: - format: uuid - - Candidate - source: - openapi: ats_v3.yml - inline: true - ApplicationRequestJob: - discriminated: false - docs: The job being applied for. - union: - - type: string - validation: - format: uuid - - Job - source: - openapi: ats_v3.yml - inline: true - ApplicationRequestOffersItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Offer - source: - openapi: ats_v3.yml - inline: true - ApplicationRequestCreditedTo: - discriminated: false - docs: The user credited for this application. - union: - - type: string - validation: - format: uuid - - RemoteUser - source: - openapi: ats_v3.yml - inline: true - ApplicationRequestScreeningQuestionAnswersItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - ScreeningQuestionAnswerRequest - source: - openapi: ats_v3.yml - inline: true - ApplicationRequestCurrentStage: - discriminated: false - docs: The application's current stage. - union: - - type: string - validation: - format: uuid - - JobInterviewStage - source: - openapi: ats_v3.yml - inline: true - ApplicationRequestRejectReason: - discriminated: false - docs: The application's reason for rejection. - union: - - type: string - validation: - format: uuid - - RejectReason - source: - openapi: ats_v3.yml - inline: true - ApplicationRequest: - docs: >- - # The Application Object - - ### Description - - The Application Object is used to represent a candidate's journey through - a particular Job's recruiting process. If a Candidate applies for multiple - Jobs, there will be a separate Application for each Job if the third-party - integration allows it. - - - ### Usage Example - - Fetch from the `LIST Applications` endpoint and filter by `ID` to show all - applications. - properties: - candidate: - type: optional - docs: The candidate applying. - job: - type: optional - docs: The job being applied for. - applied_at: - type: optional - docs: When the application was submitted. - rejected_at: - type: optional - docs: When the application was rejected. - offers: optional>> - source: - type: optional - docs: The application's source. - credited_to: - type: optional - docs: The user credited for this application. - screening_question_answers: optional> - current_stage: - type: optional - docs: The application's current stage. - reject_reason: - type: optional - docs: The application's reason for rejection. - remote_template_id: - type: optional - validation: - minLength: 1 - access: write-only - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: ats_v3.yml - ApplicationResponse: - properties: - model: Application - warnings: list - errors: list - logs: optional> - source: - openapi: ats_v3.yml - AsyncPassthroughReciept: - properties: - async_passthrough_receipt_id: - type: string - validation: - format: uuid - source: - openapi: ats_v3.yml - AttachmentAttachmentType: - discriminated: false - docs: |- - The attachment's type. - - * `RESUME` - RESUME - * `COVER_LETTER` - COVER_LETTER - * `OFFER_LETTER` - OFFER_LETTER - * `OTHER` - OTHER - union: - - AttachmentTypeEnum - - string - source: - openapi: ats_v3.yml - inline: true - Attachment: - docs: >- - # The Attachment Object - - ### Description - - The `Attachment` object is used to represent a file attached to a - candidate. - - ### Usage Example - - Fetch from the `LIST Attachments` endpoint and view attachments accessible - by a company. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - file_name: - type: optional - docs: The attachment's name. - file_url: - type: optional - docs: The attachment's url. - validation: - format: uri - maxLength: 2000 - candidate: - type: optional - docs: '' - validation: - format: uuid - attachment_type: - type: optional - docs: |- - The attachment's type. - - * `RESUME` - RESUME - * `COVER_LETTER` - COVER_LETTER - * `OFFER_LETTER` - OFFER_LETTER - * `OTHER` - OTHER - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ats_v3.yml - AttachmentRequestAttachmentType: - discriminated: false - docs: |- - The attachment's type. - - * `RESUME` - RESUME - * `COVER_LETTER` - COVER_LETTER - * `OFFER_LETTER` - OFFER_LETTER - * `OTHER` - OTHER - union: - - AttachmentTypeEnum - - string - source: - openapi: ats_v3.yml - inline: true - AttachmentRequest: - docs: >- - # The Attachment Object - - ### Description - - The `Attachment` object is used to represent a file attached to a - candidate. - - ### Usage Example - - Fetch from the `LIST Attachments` endpoint and view attachments accessible - by a company. - properties: - file_name: - type: optional - docs: The attachment's name. - file_url: - type: optional - docs: The attachment's url. - validation: - format: uri - maxLength: 2000 - candidate: - type: optional - docs: '' - validation: - format: uuid - attachment_type: - type: optional - docs: |- - The attachment's type. - - * `RESUME` - RESUME - * `COVER_LETTER` - COVER_LETTER - * `OFFER_LETTER` - OFFER_LETTER - * `OTHER` - OTHER - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: ats_v3.yml - AttachmentResponse: - properties: - model: Attachment - warnings: list - errors: list - logs: optional> - source: - openapi: ats_v3.yml - AttachmentTypeEnum: - enum: - - RESUME - - COVER_LETTER - - OFFER_LETTER - - OTHER - docs: |- - * `RESUME` - RESUME - * `COVER_LETTER` - COVER_LETTER - * `OFFER_LETTER` - OFFER_LETTER - * `OTHER` - OTHER - source: - openapi: ats_v3.yml - AuditLogEventRole: - discriminated: false - docs: >- - Designates the role of the user (or SYSTEM/API if action not taken by a - user) at the time of this Event occurring. - - - * `ADMIN` - ADMIN - - * `DEVELOPER` - DEVELOPER - - * `MEMBER` - MEMBER - - * `API` - API - - * `SYSTEM` - SYSTEM - - * `MERGE_TEAM` - MERGE_TEAM - union: - - RoleEnum - - string - source: - openapi: ats_v3.yml - inline: true - AuditLogEventEventType: - discriminated: false - docs: >- - Designates the type of event that occurred. - - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - union: - - EventTypeEnum - - string - source: - openapi: ats_v3.yml - inline: true - AuditLogEvent: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - user_name: - type: optional - docs: The User's full name at the time of this Event occurring. - validation: - maxLength: 200 - user_email: - type: optional - docs: The User's email at the time of this Event occurring. - validation: - format: email - maxLength: 254 - role: - type: AuditLogEventRole - docs: >- - Designates the role of the user (or SYSTEM/API if action not taken by - a user) at the time of this Event occurring. - - - * `ADMIN` - ADMIN - - * `DEVELOPER` - DEVELOPER - - * `MEMBER` - MEMBER - - * `API` - API - - * `SYSTEM` - SYSTEM - - * `MERGE_TEAM` - MERGE_TEAM - ip_address: - type: string - validation: - maxLength: 45 - event_type: - type: AuditLogEventEventType - docs: >- - Designates the type of event that occurred. - - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - event_description: string - created_at: - type: optional - access: read-only - source: - openapi: ats_v3.yml - AvailableActions: - docs: >- - # The AvailableActions Object - - ### Description - - The `Activity` object is used to see all available model/operation - combinations for an integration. - - - ### Usage Example - - Fetch all the actions available for the `Zenefits` integration. - properties: - integration: AccountIntegration - passthrough_available: boolean - available_model_operations: optional> - source: - openapi: ats_v3.yml - CandidateApplicationsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Application - source: - openapi: ats_v3.yml - inline: true - CandidateAttachmentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Attachment - source: - openapi: ats_v3.yml - inline: true - Candidate: - docs: >- - # The Candidate Object - - ### Description - - The `Candidate` object is used to represent profile information about a - given Candidate. Because it is specific to a Candidate, this information - stays constant across applications. - - ### Usage Example - - Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all - candidates. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - first_name: - type: optional - docs: The candidate's first name. - last_name: - type: optional - docs: The candidate's last name. - company: - type: optional - docs: The candidate's current company. - title: - type: optional - docs: The candidate's current title. - remote_created_at: - type: optional - docs: When the third party's candidate was created. - remote_updated_at: - type: optional - docs: When the third party's candidate was updated. - last_interaction_at: - type: optional - docs: When the most recent interaction with the candidate occurred. - is_private: - type: optional - docs: Whether or not the candidate is private. - can_email: - type: optional - docs: Whether or not the candidate can be emailed. - locations: - type: optional>> - docs: The candidate's locations. - phone_numbers: optional> - email_addresses: optional> - urls: optional> - tags: - type: optional>> - docs: Array of `Tag` names as strings. - applications: - type: optional>> - docs: Array of `Application` object IDs. - attachments: - type: optional>> - docs: Array of `Attachment` object IDs. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ats_v3.yml - CandidateRequestApplicationsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Application - source: - openapi: ats_v3.yml - inline: true - CandidateRequestAttachmentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Attachment - source: - openapi: ats_v3.yml - inline: true - CandidateRequest: - docs: >- - # The Candidate Object - - ### Description - - The `Candidate` object is used to represent profile information about a - given Candidate. Because it is specific to a Candidate, this information - stays constant across applications. - - ### Usage Example - - Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all - candidates. - properties: - first_name: - type: optional - docs: The candidate's first name. - last_name: - type: optional - docs: The candidate's last name. - company: - type: optional - docs: The candidate's current company. - title: - type: optional - docs: The candidate's current title. - last_interaction_at: - type: optional - docs: When the most recent interaction with the candidate occurred. - is_private: - type: optional - docs: Whether or not the candidate is private. - can_email: - type: optional - docs: Whether or not the candidate can be emailed. - locations: - type: optional>> - docs: The candidate's locations. - phone_numbers: optional> - email_addresses: optional> - urls: optional> - tags: - type: optional>> - docs: Array of `Tag` names as strings. - applications: - type: optional>> - docs: Array of `Application` object IDs. - attachments: - type: optional>> - docs: Array of `Attachment` object IDs. - remote_template_id: - type: optional - validation: - minLength: 1 - access: write-only - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: ats_v3.yml - CandidateResponse: - properties: - model: Candidate - warnings: list - errors: list - logs: optional> - source: - openapi: ats_v3.yml - CategoriesEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - docs: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - source: - openapi: ats_v3.yml - CategoryEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - docs: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - source: - openapi: ats_v3.yml - CommonModelScopeApi: - properties: - common_models: - docs: The common models you want to update the scopes for - type: list - source: - openapi: ats_v3.yml - CommonModelScopesBodyRequest: - properties: - model_id: - type: string - validation: - minLength: 1 - enabled_actions: list - disabled_fields: list - source: - openapi: ats_v3.yml - DataPassthroughRequest: - docs: >- - # The DataPassthrough Object - - ### Description - - The `DataPassthrough` object is used to send information to an - otherwise-unsupported third-party endpoint. - - - ### Usage Example - - Create a `DataPassthrough` to get team hierarchies from your Rippling - integration. - properties: - method: MethodEnum - path: - type: string - docs: The path of the request in the third party's platform. - validation: - minLength: 1 - base_url_override: - type: optional - docs: An optional override of the third party's base url for the request. - validation: - minLength: 1 - data: - type: optional - docs: >- - The data with the request. You must include a `request_format` - parameter matching the data's format - validation: - minLength: 1 - multipart_form_data: - type: optional> - docs: >- - Pass an array of `MultipartFormField` objects in here instead of using - the `data` param if `request_format` is set to `MULTIPART`. - headers: - type: optional> - docs: >- - The headers to use for the request (Merge will handle the account's - authorization headers). `Content-Type` header is required for - passthrough. Choose content type corresponding to expected format of - receiving server. - request_format: optional - normalize_response: - type: optional - docs: >- - Optional. If true, the response will always be an object of the form - `{"type": T, "value": ...}` where `T` will be one of `string, boolean, - number, null, array, object`. - source: - openapi: ats_v3.yml - DebugModeLog: - properties: - log_id: string - dashboard_view: string - log_summary: DebugModelLogSummary - source: - openapi: ats_v3.yml - DebugModelLogSummary: - properties: - url: string - method: string - status_code: integer - source: - openapi: ats_v3.yml - Department: - docs: >- - # The Department Object - - ### Description - - The `Department` object is used to represent a department within a - company. - - ### Usage Example - - Fetch from the `LIST Departments` endpoint and view the departments within - a company. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The department's name. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ats_v3.yml - DisabilityStatusEnum: - enum: - - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY - - NO_I_DONT_HAVE_A_DISABILITY - - I_DONT_WISH_TO_ANSWER - docs: >- - * `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY - - * `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY - - * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER - source: - openapi: ats_v3.yml - EeocCandidate: - discriminated: false - docs: The candidate being represented. - union: - - type: string - validation: - format: uuid - - Candidate - source: - openapi: ats_v3.yml - inline: true - EeocRace: - discriminated: false - docs: >- - The candidate's race. - - - * `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - AMERICAN_INDIAN_OR_ALASKAN_NATIVE - - * `ASIAN` - ASIAN - - * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN - - * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO - - * `WHITE` - WHITE - - * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - - * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES - - * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY - union: - - RaceEnum - - string - source: - openapi: ats_v3.yml - inline: true - EeocGender: - discriminated: false - docs: |- - The candidate's gender. - - * `MALE` - MALE - * `FEMALE` - FEMALE - * `NON-BINARY` - NON-BINARY - * `OTHER` - OTHER - * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY - union: - - GenderEnum - - string - source: - openapi: ats_v3.yml - inline: true - EeocVeteranStatus: - discriminated: false - docs: >- - The candidate's veteran status. - - - * `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN - - * - `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` - - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN - - * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER - union: - - VeteranStatusEnum - - string - source: - openapi: ats_v3.yml - inline: true - EeocDisabilityStatus: - discriminated: false - docs: >- - The candidate's disability status. - - - * `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY - - * `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY - - * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER - union: - - DisabilityStatusEnum - - string - source: - openapi: ats_v3.yml - inline: true - Eeoc: - docs: >- - # The EEOC Object - - ### Description - - The `EEOC` object is used to represent the Equal Employment Opportunity - Commission information for a candidate (race, gender, veteran status, - disability status). - - ### Usage Example - - Fetch from the `LIST EEOCs` endpoint and filter by `candidate` to show all - EEOC information for a candidate. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - candidate: - type: optional - docs: The candidate being represented. - submitted_at: - type: optional - docs: When the information was submitted. - race: - type: optional - docs: >- - The candidate's race. - - - * `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - - AMERICAN_INDIAN_OR_ALASKAN_NATIVE - - * `ASIAN` - ASIAN - - * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN - - * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO - - * `WHITE` - WHITE - - * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - - * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES - - * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY - gender: - type: optional - docs: |- - The candidate's gender. - - * `MALE` - MALE - * `FEMALE` - FEMALE - * `NON-BINARY` - NON-BINARY - * `OTHER` - OTHER - * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY - veteran_status: - type: optional - docs: >- - The candidate's veteran status. - - - * `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN - - * - `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` - - - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN - - * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER - disability_status: - type: optional - docs: >- - The candidate's disability status. - - - * `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY - - * `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY - - * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ats_v3.yml - EmailAddressEmailAddressType: - discriminated: false - docs: |- - The type of email address. - - * `PERSONAL` - PERSONAL - * `WORK` - WORK - * `OTHER` - OTHER - union: - - EmailAddressTypeEnum - - string - source: - openapi: ats_v3.yml - inline: true - EmailAddress: - docs: >- - # The EmailAddress Object - - ### Description - - The `EmailAddress` object is used to represent a candidate's email - address. - - ### Usage Example - - Fetch from the `GET Candidate` endpoint and view their email addresses. - properties: - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - value: - type: optional - docs: The email address. - validation: - format: email - maxLength: 254 - email_address_type: - type: optional - docs: |- - The type of email address. - - * `PERSONAL` - PERSONAL - * `WORK` - WORK - * `OTHER` - OTHER - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - source: - openapi: ats_v3.yml - EmailAddressRequestEmailAddressType: - discriminated: false - docs: |- - The type of email address. - - * `PERSONAL` - PERSONAL - * `WORK` - WORK - * `OTHER` - OTHER - union: - - EmailAddressTypeEnum - - string - source: - openapi: ats_v3.yml - inline: true - EmailAddressRequest: - docs: >- - # The EmailAddress Object - - ### Description - - The `EmailAddress` object is used to represent a candidate's email - address. - - ### Usage Example - - Fetch from the `GET Candidate` endpoint and view their email addresses. - properties: - value: - type: optional - docs: The email address. - validation: - format: email - maxLength: 254 - email_address_type: - type: optional - docs: |- - The type of email address. - - * `PERSONAL` - PERSONAL - * `WORK` - WORK - * `OTHER` - OTHER - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: ats_v3.yml - EmailAddressTypeEnum: - enum: - - PERSONAL - - WORK - - OTHER - docs: |- - * `PERSONAL` - PERSONAL - * `WORK` - WORK - * `OTHER` - OTHER - source: - openapi: ats_v3.yml - EnabledActionsEnum: - enum: - - READ - - WRITE - docs: |- - * `READ` - READ - * `WRITE` - WRITE - source: - openapi: ats_v3.yml - EncodingEnum: - enum: - - RAW - - BASE64 - - GZIP_BASE64 - docs: |- - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - source: - openapi: ats_v3.yml - ErrorValidationProblem: - properties: - source: optional - title: string - detail: string - problem_type: string - source: - openapi: ats_v3.yml - EventTypeEnum: - enum: - - CREATED_REMOTE_PRODUCTION_API_KEY - - DELETED_REMOTE_PRODUCTION_API_KEY - - CREATED_TEST_API_KEY - - DELETED_TEST_API_KEY - - REGENERATED_PRODUCTION_API_KEY - - REGENERATED_WEBHOOK_SIGNATURE - - INVITED_USER - - TWO_FACTOR_AUTH_ENABLED - - TWO_FACTOR_AUTH_DISABLED - - DELETED_LINKED_ACCOUNT - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - CREATED_DESTINATION - - DELETED_DESTINATION - - CHANGED_DESTINATION - - CHANGED_SCOPES - - CHANGED_PERSONAL_INFORMATION - - CHANGED_ORGANIZATION_SETTINGS - - ENABLED_INTEGRATION - - DISABLED_INTEGRATION - - ENABLED_CATEGORY - - DISABLED_CATEGORY - - CHANGED_PASSWORD - - RESET_PASSWORD - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - FORCED_LINKED_ACCOUNT_RESYNC - - MUTED_ISSUE - - GENERATED_MAGIC_LINK - - ENABLED_MERGE_WEBHOOK - - DISABLED_MERGE_WEBHOOK - - MERGE_WEBHOOK_TARGET_CHANGED - - END_USER_CREDENTIALS_ACCESSED - docs: >- - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - source: - openapi: ats_v3.yml - ExternalTargetFieldApi: - properties: - name: - type: optional - access: read-only - description: - type: optional - access: read-only - is_mapped: - type: optional - access: read-only - source: - openapi: ats_v3.yml - ExternalTargetFieldApiResponse: - properties: - Activity: optional> - Application: optional> - Attachment: optional> - Candidate: optional> - Department: optional> - EEOC: optional> - ScheduledInterview: optional> - Job: optional> - JobPosting: optional> - JobInterviewStage: optional> - Offer: optional> - Office: optional> - RejectReason: optional> - Scorecard: optional> - Tag: optional> - RemoteUser: optional> - source: - openapi: ats_v3.yml - FieldMappingApiInstanceTargetField: - properties: - name: string - description: string - is_organization_wide: boolean - source: - openapi: ats_v3.yml - inline: true - FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: - properties: - method: optional - url_path: optional - field_traversal_path: optional> - source: - openapi: ats_v3.yml - inline: true - FieldMappingApiInstanceRemoteField: - properties: - remote_key_name: optional - schema: optional> - remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - source: - openapi: ats_v3.yml - inline: true - FieldMappingApiInstance: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - is_integration_wide: - type: optional - access: read-only - target_field: - type: optional - access: read-only - remote_field: - type: optional - access: read-only - source: - openapi: ats_v3.yml - FieldMappingApiInstanceResponse: - properties: - Activity: optional> - Application: optional> - Attachment: optional> - Candidate: optional> - Department: optional> - EEOC: optional> - ScheduledInterview: optional> - Job: optional> - JobPosting: optional> - JobInterviewStage: optional> - Offer: optional> - Office: optional> - RejectReason: optional> - Scorecard: optional> - Tag: optional> - RemoteUser: optional> - source: - openapi: ats_v3.yml - FieldMappingInstanceResponse: - properties: - model: FieldMappingApiInstance - warnings: list - errors: list - logs: optional> - source: - openapi: ats_v3.yml - FieldPermissionDeserializer: - properties: - enabled_fields: optional> - disabled_fields: optional> - source: - openapi: ats_v3.yml - FieldPermissionDeserializerRequest: - properties: - enabled_fields: optional> - disabled_fields: optional> - source: - openapi: ats_v3.yml - GenderEnum: - enum: - - MALE - - FEMALE - - value: NON-BINARY - name: NonBinary - - OTHER - - DECLINE_TO_SELF_IDENTIFY - docs: |- - * `MALE` - MALE - * `FEMALE` - FEMALE - * `NON-BINARY` - NON-BINARY - * `OTHER` - OTHER - * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY - source: - openapi: ats_v3.yml - IgnoreCommonModelRequestReason: - discriminated: false - union: - - ReasonEnum - - string - source: - openapi: ats_v3.yml - inline: true - IgnoreCommonModelRequest: - properties: - reason: IgnoreCommonModelRequestReason - message: - type: optional - validation: - minLength: 1 - maxLength: 256 - source: - openapi: ats_v3.yml - IndividualCommonModelScopeDeserializer: - properties: - model_name: string - model_permissions: optional> - field_permissions: optional - source: - openapi: ats_v3.yml - IndividualCommonModelScopeDeserializerRequest: - properties: - model_name: - type: string - validation: - minLength: 1 - model_permissions: optional> - field_permissions: optional - source: - openapi: ats_v3.yml - IssueStatus: - discriminated: false - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - union: - - IssueStatusEnum - - string - source: - openapi: ats_v3.yml - inline: true - Issue: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - status: - type: optional - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - error_description: string - end_user: - type: optional> - access: read-only - first_incident_time: optional - last_incident_time: optional - is_muted: - type: optional - access: read-only - error_details: - type: optional> - access: read-only - source: - openapi: ats_v3.yml - IssueStatusEnum: - enum: - - ONGOING - - RESOLVED - docs: |- - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - source: - openapi: ats_v3.yml - JobStatus: - discriminated: false - docs: |- - The job's status. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - * `DRAFT` - DRAFT - * `ARCHIVED` - ARCHIVED - * `PENDING` - PENDING - union: - - JobStatusEnum - - string - source: - openapi: ats_v3.yml - inline: true - JobType: - discriminated: false - docs: |- - The job's type. - - * `POSTING` - POSTING - * `REQUISITION` - REQUISITION - * `PROFILE` - PROFILE - union: - - JobTypeEnum - - string - source: - openapi: ats_v3.yml - inline: true - JobDepartmentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Department - source: - openapi: ats_v3.yml - inline: true - JobOfficesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Office - source: - openapi: ats_v3.yml - inline: true - JobHiringManagersItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - RemoteUser - source: - openapi: ats_v3.yml - inline: true - JobRecruitersItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - RemoteUser - source: - openapi: ats_v3.yml - inline: true - Job: - docs: >- - # The Job Object - - ### Description - - The `Job` object can be used to track any jobs that are currently or will - be open/closed for applications. - - ### Usage Example - - Fetch from the `LIST Jobs` endpoint to show all job postings. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The job's name. - description: - type: optional - docs: The job's description. - code: - type: optional - docs: >- - The job's code. Typically an additional identifier used to reference - the particular job that is displayed on the ATS. - status: - type: optional - docs: |- - The job's status. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - * `DRAFT` - DRAFT - * `ARCHIVED` - ARCHIVED - * `PENDING` - PENDING - type: - type: optional - docs: |- - The job's type. - - * `POSTING` - POSTING - * `REQUISITION` - REQUISITION - * `PROFILE` - PROFILE - job_postings: - type: optional>> - docs: IDs of `JobPosting` objects that serve as job postings for this `Job`. - job_posting_urls: optional> - remote_created_at: - type: optional - docs: When the third party's job was created. - remote_updated_at: - type: optional - docs: When the third party's job was updated. - confidential: - type: optional - docs: Whether the job is confidential. - departments: - type: optional>> - docs: IDs of `Department` objects for this `Job`. - offices: - type: optional>> - docs: IDs of `Office` objects for this `Job`. - hiring_managers: - type: optional>> - docs: >- - IDs of `RemoteUser` objects that serve as hiring managers for this - `Job`. - recruiters: - type: optional>> - docs: IDs of `RemoteUser` objects that serve as recruiters for this `Job`. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ats_v3.yml - JobInterviewStageJob: - discriminated: false - docs: >- - This field is populated only if the stage is specific to a particular job. - If the stage is generic, this field will not be populated. - union: - - type: string - validation: - format: uuid - - Job - source: - openapi: ats_v3.yml - inline: true - JobInterviewStage: - docs: >- - # The JobInterviewStage Object - - ### Description - - The `JobInterviewStage` object is used to represent a particular - recruiting stage for an `Application`. A given `Application` typically has - the `JobInterviewStage` object represented in the current_stage field. - - ### Usage Example - - Fetch from the `LIST JobInterviewStages` endpoint and view the job - interview stages used by a company. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: >- - Standard stage names are offered by ATS systems but can be modified by - users. - job: - type: optional - docs: >- - This field is populated only if the stage is specific to a particular - job. If the stage is generic, this field will not be populated. - stage_order: - type: optional - docs: >- - The stage’s order, with the lowest values ordered first. If the - third-party does not return details on the order of stages, this field - will not be populated. - validation: - min: -2147483648 - max: 2147483647 - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ats_v3.yml - JobPostingJobPostingUrlsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Url - source: - openapi: ats_v3.yml - inline: true - JobPostingJob: - discriminated: false - docs: ID of `Job` object for this `JobPosting`. - union: - - type: string - validation: - format: uuid - - Job - source: - openapi: ats_v3.yml - inline: true - JobPostingStatus: - discriminated: false - docs: |- - The job posting's status. - - * `PUBLISHED` - PUBLISHED - * `CLOSED` - CLOSED - * `DRAFT` - DRAFT - * `INTERNAL` - INTERNAL - * `PENDING` - PENDING - union: - - JobPostingStatusEnum - - string - source: - openapi: ats_v3.yml - inline: true - JobPosting: - docs: >- - # The JobPosting Object - - ### Description - - The `JobPosting` object represents an external announcement on a job board - created by an organization to attract qualified candidates to apply for a - specific `Job` opening - - ### Usage Example - - Fetch from the `LIST JobPostings` endpoint to show all job postings. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - title: - type: optional - docs: The job posting’s title. - job_posting_urls: - type: optional> - docs: >- - The Url object is used to represent hyperlinks for a candidate to - apply to a given job. - job: - type: optional - docs: ID of `Job` object for this `JobPosting`. - status: - type: optional - docs: |- - The job posting's status. - - * `PUBLISHED` - PUBLISHED - * `CLOSED` - CLOSED - * `DRAFT` - DRAFT - * `INTERNAL` - INTERNAL - * `PENDING` - PENDING - content: - type: optional - docs: The job posting’s content. - remote_created_at: - type: optional - docs: When the third party's job posting was created. - remote_updated_at: - type: optional - docs: When the third party's job posting was updated. - is_internal: - type: optional - docs: Indicates whether the job posting is internal or external. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ats_v3.yml - JobPostingStatusEnum: - enum: - - PUBLISHED - - CLOSED - - DRAFT - - INTERNAL - - PENDING - docs: |- - * `PUBLISHED` - PUBLISHED - * `CLOSED` - CLOSED - * `DRAFT` - DRAFT - * `INTERNAL` - INTERNAL - * `PENDING` - PENDING - source: - openapi: ats_v3.yml - JobStatusEnum: - enum: - - OPEN - - CLOSED - - DRAFT - - ARCHIVED - - PENDING - docs: |- - * `OPEN` - OPEN - * `CLOSED` - CLOSED - * `DRAFT` - DRAFT - * `ARCHIVED` - ARCHIVED - * `PENDING` - PENDING - source: - openapi: ats_v3.yml - JobTypeEnum: - enum: - - POSTING - - REQUISITION - - PROFILE - docs: |- - * `POSTING` - POSTING - * `REQUISITION` - REQUISITION - * `PROFILE` - PROFILE - source: - openapi: ats_v3.yml - LanguageEnum: - enum: - - en - - de - docs: |- - * `en` - en - * `de` - de - source: - openapi: ats_v3.yml - LastSyncResultEnum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - docs: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - source: - openapi: ats_v3.yml - LinkToken: - properties: - link_token: string - integration_name: optional - magic_link_url: optional - source: - openapi: ats_v3.yml - LinkedAccountStatus: - properties: - linked_account_status: string - can_make_request: boolean - source: - openapi: ats_v3.yml - MetaResponse: - properties: - request_schema: map - remote_field_classes: optional> - status: optional - has_conditional_params: boolean - has_required_linked_account_params: boolean - source: - openapi: ats_v3.yml - MethodEnum: - enum: - - GET - - OPTIONS - - HEAD - - POST - - PUT - - PATCH - - DELETE - docs: |- - * `GET` - GET - * `OPTIONS` - OPTIONS - * `HEAD` - HEAD - * `POST` - POST - * `PUT` - PUT - * `PATCH` - PATCH - * `DELETE` - DELETE - source: - openapi: ats_v3.yml - ModelOperation: - docs: >- - # The ModelOperation Object - - ### Description - - The `ModelOperation` object is used to represent the operations that are - currently supported for a given model. - - - ### Usage Example - - View what operations are supported for the `Candidate` endpoint. - properties: - model_name: string - available_operations: list - required_post_parameters: list - supported_fields: list - source: - openapi: ats_v3.yml - ModelPermissionDeserializer: - properties: - is_enabled: optional - source: - openapi: ats_v3.yml - ModelPermissionDeserializerRequest: - properties: - is_enabled: optional - source: - openapi: ats_v3.yml - MultipartFormFieldRequestEncoding: - discriminated: false - docs: |- - The encoding of the value of `data`. Defaults to `RAW` if not defined. - - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - union: - - EncodingEnum - - string - source: - openapi: ats_v3.yml - inline: true - MultipartFormFieldRequest: - docs: >- - # The MultipartFormField Object - - ### Description - - The `MultipartFormField` object is used to represent fields in an HTTP - request using `multipart/form-data`. - - - ### Usage Example - - Create a `MultipartFormField` to define a multipart form entry. - properties: - name: - type: string - docs: The name of the form field - validation: - minLength: 1 - data: - type: string - docs: The data for the form field. - validation: - minLength: 1 - encoding: - type: optional - docs: |- - The encoding of the value of `data`. Defaults to `RAW` if not defined. - - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - file_name: - type: optional - docs: The file name of the form field, if the field is for a file. - validation: - minLength: 1 - content_type: - type: optional - docs: The MIME type of the file, if the field is for a file. - validation: - minLength: 1 - source: - openapi: ats_v3.yml - OfferApplication: - discriminated: false - docs: The application who is receiving the offer. - union: - - type: string - validation: - format: uuid - - Application - source: - openapi: ats_v3.yml - inline: true - OfferCreator: - discriminated: false - docs: The user who created the offer. - union: - - type: string - validation: - format: uuid - - RemoteUser - source: - openapi: ats_v3.yml - inline: true - OfferStatus: - discriminated: false - docs: |- - The offer's status. - - * `DRAFT` - DRAFT - * `APPROVAL-SENT` - APPROVAL-SENT - * `APPROVED` - APPROVED - * `SENT` - SENT - * `SENT-MANUALLY` - SENT-MANUALLY - * `OPENED` - OPENED - * `DENIED` - DENIED - * `SIGNED` - SIGNED - * `DEPRECATED` - DEPRECATED - union: - - OfferStatusEnum - - string - source: - openapi: ats_v3.yml - inline: true - Offer: - docs: >- - # The Offer Object - - ### Description - - The `Offer` object is used to represent an offer for a candidate's - application specific to a job. - - ### Usage Example - - Fetch from the `LIST Offers` endpoint and filter by `ID` to show all - offers. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - application: - type: optional - docs: The application who is receiving the offer. - creator: - type: optional - docs: The user who created the offer. - remote_created_at: - type: optional - docs: When the third party's offer was created. - closed_at: - type: optional - docs: When the offer was closed. - sent_at: - type: optional - docs: When the offer was sent. - start_date: - type: optional - docs: The employment start date on the offer. - status: - type: optional - docs: |- - The offer's status. - - * `DRAFT` - DRAFT - * `APPROVAL-SENT` - APPROVAL-SENT - * `APPROVED` - APPROVED - * `SENT` - SENT - * `SENT-MANUALLY` - SENT-MANUALLY - * `OPENED` - OPENED - * `DENIED` - DENIED - * `SIGNED` - SIGNED - * `DEPRECATED` - DEPRECATED - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ats_v3.yml - OfferStatusEnum: - enum: - - DRAFT - - value: APPROVAL-SENT - name: ApprovalSent - - APPROVED - - SENT - - value: SENT-MANUALLY - name: SentManually - - OPENED - - DENIED - - SIGNED - - DEPRECATED - docs: |- - * `DRAFT` - DRAFT - * `APPROVAL-SENT` - APPROVAL-SENT - * `APPROVED` - APPROVED - * `SENT` - SENT - * `SENT-MANUALLY` - SENT-MANUALLY - * `OPENED` - OPENED - * `DENIED` - DENIED - * `SIGNED` - SIGNED - * `DEPRECATED` - DEPRECATED - source: - openapi: ats_v3.yml - Office: - docs: >- - # The Office Object - - ### Description - - The `Office` object is used to represent an office within a company. A - given `Job` has the `Office` ID in its offices field. - - ### Usage Example - - Fetch from the `LIST Offices` endpoint and view the offices within a - company. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The office's name. - location: - type: optional - docs: The office's location. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ats_v3.yml - OverallRecommendationEnum: - enum: - - DEFINITELY_NO - - 'NO' - - 'YES' - - STRONG_YES - - NO_DECISION - docs: |- - * `DEFINITELY_NO` - DEFINITELY_NO - * `NO` - NO - * `YES` - YES - * `STRONG_YES` - STRONG_YES - * `NO_DECISION` - NO_DECISION - source: - openapi: ats_v3.yml - PaginatedAccountDetailsAndActionsList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedActivityList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedApplicationList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedAttachmentList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedAuditLogEventList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedCandidateList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedDepartmentList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedEeocList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedIssueList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedJobInterviewStageList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedJobList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedJobPostingList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedOfferList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedOfficeList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedRejectReasonList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedRemoteUserList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedScheduledInterviewList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedScorecardList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedScreeningQuestionList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedSyncStatusList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PaginatedTagList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ats_v3.yml - PatchedCandidateRequest: - docs: >- - # The Candidate Object - - ### Description - - The `Candidate` object is used to represent profile information about a - given Candidate. Because it is specific to a Candidate, this information - stays constant across applications. - - ### Usage Example - - Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all - candidates. - properties: - first_name: - type: optional - docs: The candidate's first name. - last_name: - type: optional - docs: The candidate's last name. - company: - type: optional - docs: The candidate's current company. - title: - type: optional - docs: The candidate's current title. - last_interaction_at: - type: optional - docs: When the most recent interaction with the candidate occurred. - is_private: - type: optional - docs: Whether or not the candidate is private. - can_email: - type: optional - docs: Whether or not the candidate can be emailed. - locations: - type: optional>> - docs: The candidate's locations. - phone_numbers: optional> - email_addresses: optional> - urls: optional> - tags: - type: optional>> - docs: Array of `Tag` names as strings. - applications: - type: optional>> - docs: Array of `Application` object IDs. - attachments: - type: optional>> - docs: Array of `Attachment` object IDs. - remote_template_id: - type: optional - validation: - minLength: 1 - access: write-only - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: ats_v3.yml - PhoneNumberPhoneNumberType: - discriminated: false - docs: |- - The type of phone number. - - * `HOME` - HOME - * `WORK` - WORK - * `MOBILE` - MOBILE - * `SKYPE` - SKYPE - * `OTHER` - OTHER - union: - - PhoneNumberTypeEnum - - string - source: - openapi: ats_v3.yml - inline: true - PhoneNumber: - docs: |- - # The PhoneNumber Object - ### Description - The `PhoneNumber` object is used to represent a candidate's phone number. - ### Usage Example - Fetch from the `GET Candidate` endpoint and view their phone numbers. - properties: - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - value: - type: optional - docs: The phone number. - phone_number_type: - type: optional - docs: |- - The type of phone number. - - * `HOME` - HOME - * `WORK` - WORK - * `MOBILE` - MOBILE - * `SKYPE` - SKYPE - * `OTHER` - OTHER - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - source: - openapi: ats_v3.yml - PhoneNumberRequestPhoneNumberType: - discriminated: false - docs: |- - The type of phone number. - - * `HOME` - HOME - * `WORK` - WORK - * `MOBILE` - MOBILE - * `SKYPE` - SKYPE - * `OTHER` - OTHER - union: - - PhoneNumberTypeEnum - - string - source: - openapi: ats_v3.yml - inline: true - PhoneNumberRequest: - docs: |- - # The PhoneNumber Object - ### Description - The `PhoneNumber` object is used to represent a candidate's phone number. - ### Usage Example - Fetch from the `GET Candidate` endpoint and view their phone numbers. - properties: - value: - type: optional - docs: The phone number. - phone_number_type: - type: optional - docs: |- - The type of phone number. - - * `HOME` - HOME - * `WORK` - WORK - * `MOBILE` - MOBILE - * `SKYPE` - SKYPE - * `OTHER` - OTHER - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: ats_v3.yml - PhoneNumberTypeEnum: - enum: - - HOME - - WORK - - MOBILE - - SKYPE - - OTHER - docs: |- - * `HOME` - HOME - * `WORK` - WORK - * `MOBILE` - MOBILE - * `SKYPE` - SKYPE - * `OTHER` - OTHER - source: - openapi: ats_v3.yml - RaceEnum: - enum: - - AMERICAN_INDIAN_OR_ALASKAN_NATIVE - - ASIAN - - BLACK_OR_AFRICAN_AMERICAN - - HISPANIC_OR_LATINO - - WHITE - - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - - TWO_OR_MORE_RACES - - DECLINE_TO_SELF_IDENTIFY - docs: >- - * `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - AMERICAN_INDIAN_OR_ALASKAN_NATIVE - - * `ASIAN` - ASIAN - - * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN - - * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO - - * `WHITE` - WHITE - - * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - - * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES - - * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY - source: - openapi: ats_v3.yml - ReasonEnum: - enum: - - GENERAL_CUSTOMER_REQUEST - - GDPR - - OTHER - docs: |- - * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST - * `GDPR` - GDPR - * `OTHER` - OTHER - source: - openapi: ats_v3.yml - RejectReason: - docs: >- - # The RejectReason Object - - ### Description - - The `RejectReason` object is used to represent a reason for rejecting an - application. These can typically be configured within an ATS system. - - ### Usage Example - - Fetch from the `LIST RejectReasons` endpoint and filter by `ID` to show - all reasons. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The rejection reason’s name. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ats_v3.yml - RemoteData: - docs: >- - # The RemoteData Object - - ### Description - - The `RemoteData` object is used to represent the full data pulled from the - third-party API for an object. - - - ### Usage Example - - TODO - properties: - path: - type: string - docs: The third-party API path that is being called. - data: - type: optional - access: read-only - source: - openapi: ats_v3.yml - RemoteEndpointInfo: - properties: - method: string - url_path: string - field_traversal_path: list - source: - openapi: ats_v3.yml - RemoteFieldApiCoverage: - discriminated: false - union: - - integer - - double - source: - openapi: ats_v3.yml - inline: true - RemoteFieldApi: - properties: - schema: map - remote_key_name: string - remote_endpoint_info: RemoteEndpointInfo - example_values: optional> - advanced_metadata: optional - coverage: - type: optional - access: read-only - source: - openapi: ats_v3.yml - RemoteFieldApiResponse: - properties: - Activity: optional> - Application: optional> - Attachment: optional> - Candidate: optional> - Department: optional> - EEOC: optional> - ScheduledInterview: optional> - Job: optional> - JobPosting: optional> - JobInterviewStage: optional> - Offer: optional> - Office: optional> - RejectReason: optional> - Scorecard: optional> - Tag: optional> - RemoteUser: optional> - source: - openapi: ats_v3.yml - RemoteKey: - docs: >- - # The RemoteKey Object - - ### Description - - The `RemoteKey` object is used to represent a request for a new remote - key. - - - ### Usage Example - - Post a `GenerateRemoteKey` to receive a new `RemoteKey`. - properties: - name: string - key: string - source: - openapi: ats_v3.yml - RemoteResponseResponseType: - discriminated: false - union: - - ResponseTypeEnum - - string - source: - openapi: ats_v3.yml - inline: true - RemoteResponse: - docs: >- - # The RemoteResponse Object - - ### Description - - The `RemoteResponse` object is used to represent information returned from - a third-party endpoint. - - - ### Usage Example - - View the `RemoteResponse` returned from your `DataPassthrough`. - properties: - method: string - path: string - status: integer - response: unknown - response_headers: optional> - response_type: optional - headers: optional> - source: - openapi: ats_v3.yml - RemoteUserAccessRole: - discriminated: false - docs: |- - The user's role. - - * `SUPER_ADMIN` - SUPER_ADMIN - * `ADMIN` - ADMIN - * `TEAM_MEMBER` - TEAM_MEMBER - * `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER - * `INTERVIEWER` - INTERVIEWER - union: - - AccessRoleEnum - - string - source: - openapi: ats_v3.yml - inline: true - RemoteUser: - docs: >- - # The RemoteUser Object - - ### Description - - The `RemoteUser` object is used to represent a user with a login to the - ATS system. - - ### Usage Example - - Fetch from the `LIST RemoteUsers` endpoint to show all users for a third - party. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - first_name: - type: optional - docs: The user's first name. - last_name: - type: optional - docs: The user's last name. - email: - type: optional - docs: The user's email. - validation: - format: email - maxLength: 254 - disabled: - type: optional - docs: Whether the user's account had been disabled. - remote_created_at: - type: optional - docs: When the third party's user was created. - access_role: - type: optional - docs: |- - The user's role. - - * `SUPER_ADMIN` - SUPER_ADMIN - * `ADMIN` - ADMIN - * `TEAM_MEMBER` - TEAM_MEMBER - * `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER - * `INTERVIEWER` - INTERVIEWER - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ats_v3.yml - RequestFormatEnum: - enum: - - JSON - - XML - - MULTIPART - docs: |- - * `JSON` - JSON - * `XML` - XML - * `MULTIPART` - MULTIPART - source: - openapi: ats_v3.yml - ResponseTypeEnum: - enum: - - JSON - - BASE64_GZIP - docs: |- - * `JSON` - JSON - * `BASE64_GZIP` - BASE64_GZIP - source: - openapi: ats_v3.yml - RoleEnum: - enum: - - ADMIN - - DEVELOPER - - MEMBER - - API - - SYSTEM - - MERGE_TEAM - docs: |- - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - source: - openapi: ats_v3.yml - ScheduledInterviewApplication: - discriminated: false - docs: The application being interviewed. - union: - - type: string - validation: - format: uuid - - Application - source: - openapi: ats_v3.yml - inline: true - ScheduledInterviewJobInterviewStage: - discriminated: false - docs: The stage of the interview. - union: - - type: string - validation: - format: uuid - - JobInterviewStage - source: - openapi: ats_v3.yml - inline: true - ScheduledInterviewOrganizer: - discriminated: false - docs: The user organizing the interview. - union: - - type: string - validation: - format: uuid - - RemoteUser - source: - openapi: ats_v3.yml - inline: true - ScheduledInterviewInterviewersItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - RemoteUser - source: - openapi: ats_v3.yml - inline: true - ScheduledInterviewStatus: - discriminated: false - docs: |- - The interview's status. - - * `SCHEDULED` - SCHEDULED - * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK - * `COMPLETE` - COMPLETE - union: - - ScheduledInterviewStatusEnum - - string - source: - openapi: ats_v3.yml - inline: true - ScheduledInterview: - docs: >- - # The ScheduledInterview Object - - ### Description - - The `ScheduledInterview` object is used to represent a scheduled interview - for a given candidate’s application to a job. An `Application` can have - multiple `ScheduledInterview`s depending on the particular hiring process. - - ### Usage Example - - Fetch from the `LIST ScheduledInterviews` endpoint and filter by - `interviewers` to show all office locations. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - application: - type: optional - docs: The application being interviewed. - job_interview_stage: - type: optional - docs: The stage of the interview. - organizer: - type: optional - docs: The user organizing the interview. - interviewers: - type: optional>> - docs: Array of `RemoteUser` IDs. - location: - type: optional - docs: The interview's location. - start_at: - type: optional - docs: When the interview was started. - end_at: - type: optional - docs: When the interview was ended. - remote_created_at: - type: optional - docs: When the third party's interview was created. - remote_updated_at: - type: optional - docs: When the third party's interview was updated. - status: - type: optional - docs: |- - The interview's status. - - * `SCHEDULED` - SCHEDULED - * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK - * `COMPLETE` - COMPLETE - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ats_v3.yml - ScheduledInterviewRequestApplication: - discriminated: false - docs: The application being interviewed. - union: - - type: string - validation: - format: uuid - - Application - source: - openapi: ats_v3.yml - inline: true - ScheduledInterviewRequestJobInterviewStage: - discriminated: false - docs: The stage of the interview. - union: - - type: string - validation: - format: uuid - - JobInterviewStage - source: - openapi: ats_v3.yml - inline: true - ScheduledInterviewRequestOrganizer: - discriminated: false - docs: The user organizing the interview. - union: - - type: string - validation: - format: uuid - - RemoteUser - source: - openapi: ats_v3.yml - inline: true - ScheduledInterviewRequestInterviewersItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - RemoteUser - source: - openapi: ats_v3.yml - inline: true - ScheduledInterviewRequestStatus: - discriminated: false - docs: |- - The interview's status. - - * `SCHEDULED` - SCHEDULED - * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK - * `COMPLETE` - COMPLETE - union: - - ScheduledInterviewStatusEnum - - string - source: - openapi: ats_v3.yml - inline: true - ScheduledInterviewRequest: - docs: >- - # The ScheduledInterview Object - - ### Description - - The `ScheduledInterview` object is used to represent a scheduled interview - for a given candidate’s application to a job. An `Application` can have - multiple `ScheduledInterview`s depending on the particular hiring process. - - ### Usage Example - - Fetch from the `LIST ScheduledInterviews` endpoint and filter by - `interviewers` to show all office locations. - properties: - application: - type: optional - docs: The application being interviewed. - job_interview_stage: - type: optional - docs: The stage of the interview. - organizer: - type: optional - docs: The user organizing the interview. - interviewers: - type: optional>> - docs: Array of `RemoteUser` IDs. - location: - type: optional - docs: The interview's location. - start_at: - type: optional - docs: When the interview was started. - end_at: - type: optional - docs: When the interview was ended. - status: - type: optional - docs: |- - The interview's status. - - * `SCHEDULED` - SCHEDULED - * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK - * `COMPLETE` - COMPLETE - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: ats_v3.yml - ScheduledInterviewResponse: - properties: - model: ScheduledInterview - warnings: list - errors: list - logs: optional> - source: - openapi: ats_v3.yml - ScheduledInterviewStatusEnum: - enum: - - SCHEDULED - - AWAITING_FEEDBACK - - COMPLETE - docs: |- - * `SCHEDULED` - SCHEDULED - * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK - * `COMPLETE` - COMPLETE - source: - openapi: ats_v3.yml - ScorecardApplication: - discriminated: false - docs: The application being scored. - union: - - type: string - validation: - format: uuid - - Application - source: - openapi: ats_v3.yml - inline: true - ScorecardInterview: - discriminated: false - docs: The interview being scored. - union: - - type: string - validation: - format: uuid - - ScheduledInterview - source: - openapi: ats_v3.yml - inline: true - ScorecardInterviewer: - discriminated: false - docs: The interviewer doing the scoring. - union: - - type: string - validation: - format: uuid - - RemoteUser - source: - openapi: ats_v3.yml - inline: true - ScorecardOverallRecommendation: - discriminated: false - docs: |- - The inteviewer's recommendation. - - * `DEFINITELY_NO` - DEFINITELY_NO - * `NO` - NO - * `YES` - YES - * `STRONG_YES` - STRONG_YES - * `NO_DECISION` - NO_DECISION - union: - - OverallRecommendationEnum - - string - source: - openapi: ats_v3.yml - inline: true - Scorecard: - docs: >- - # The Scorecard Object - - ### Description - - The `Scorecard` object is used to represent an interviewer's candidate - recommendation based on a particular interview. - - ### Usage Example - - Fetch from the `LIST Scorecards` endpoint and filter by `application` to - show all scorecard for an applicant. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - application: - type: optional - docs: The application being scored. - interview: - type: optional - docs: The interview being scored. - interviewer: - type: optional - docs: The interviewer doing the scoring. - remote_created_at: - type: optional - docs: When the third party's scorecard was created. - submitted_at: - type: optional - docs: When the scorecard was submitted. - overall_recommendation: - type: optional - docs: |- - The inteviewer's recommendation. - - * `DEFINITELY_NO` - DEFINITELY_NO - * `NO` - NO - * `YES` - YES - * `STRONG_YES` - STRONG_YES - * `NO_DECISION` - NO_DECISION - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ats_v3.yml - ScreeningQuestionJob: - discriminated: false - docs: The job associated with the screening question. - union: - - type: string - validation: - format: uuid - - Job - source: - openapi: ats_v3.yml - inline: true - ScreeningQuestionType: - discriminated: false - docs: |- - The data type for the screening question. - - * `DATE` - DATE - * `FILE` - FILE - * `SINGLE_SELECT` - SINGLE_SELECT - * `MULTI_SELECT` - MULTI_SELECT - * `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT - * `MULTI_LINE_TEXT` - MULTI_LINE_TEXT - * `NUMERIC` - NUMERIC - * `BOOLEAN` - BOOLEAN - union: - - ScreeningQuestionTypeEnum - - string - source: - openapi: ats_v3.yml - inline: true - ScreeningQuestion: - docs: >- - # The ScreeningQuestion Object - - ### Description - - The `ScreeningQuestion` object is used to represent questions asked to - screen candidates for a job. - - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - job: - type: optional - docs: The job associated with the screening question. - description: - type: optional - docs: The description of the screening question - validation: - maxLength: 500 - title: - type: optional - docs: The title of the screening question - validation: - maxLength: 2500 - type: - type: optional - docs: |- - The data type for the screening question. - - * `DATE` - DATE - * `FILE` - FILE - * `SINGLE_SELECT` - SINGLE_SELECT - * `MULTI_SELECT` - MULTI_SELECT - * `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT - * `MULTI_LINE_TEXT` - MULTI_LINE_TEXT - * `NUMERIC` - NUMERIC - * `BOOLEAN` - BOOLEAN - required: - type: optional - docs: Whether or not the screening question is required. - options: optional> - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - source: - openapi: ats_v3.yml - ScreeningQuestionAnswerQuestion: - discriminated: false - docs: >- - The screening question associated with the candidate’s answer. To - determine the data type of the answer, you can expand on the screening - question by adding `screening_question_answers.question` to the `expand` - query parameter. - union: - - type: string - validation: - format: uuid - - ScreeningQuestion - source: - openapi: ats_v3.yml - inline: true - ScreeningQuestionAnswer: - docs: >- - # The ScreeningQuestionAnswer Object - - ### Description - - The `ScreeningQuestionAnswer` object is used to represent candidate - responses to a screening question, for a specific application. - - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - question: - type: optional - docs: >- - The screening question associated with the candidate’s answer. To - determine the data type of the answer, you can expand on the screening - question by adding `screening_question_answers.question` to the - `expand` query parameter. - answer: - type: optional - docs: The candidate’s response to the screening question. - validation: - maxLength: 10000 - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - source: - openapi: ats_v3.yml - ScreeningQuestionAnswerRequestQuestion: - discriminated: false - docs: >- - The screening question associated with the candidate’s answer. To - determine the data type of the answer, you can expand on the screening - question by adding `screening_question_answers.question` to the `expand` - query parameter. - union: - - type: string - validation: - format: uuid - - ScreeningQuestion - source: - openapi: ats_v3.yml - inline: true - ScreeningQuestionAnswerRequest: - docs: >- - # The ScreeningQuestionAnswer Object - - ### Description - - The `ScreeningQuestionAnswer` object is used to represent candidate - responses to a screening question, for a specific application. - - - ### Usage Example - - TODO - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - question: - type: optional - docs: >- - The screening question associated with the candidate’s answer. To - determine the data type of the answer, you can expand on the screening - question by adding `screening_question_answers.question` to the - `expand` query parameter. - answer: - type: optional - docs: The candidate’s response to the screening question. - validation: - maxLength: 10000 - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: ats_v3.yml - ScreeningQuestionOption: - docs: >- - # The ScreeningQuestionOption Object - - ### Description - - The `ScreeningQuestionOption` object is used to represent options for a - `ScreeningQuestion` object - - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - label: - type: optional - docs: Available response options - validation: - maxLength: 300 - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - source: - openapi: ats_v3.yml - ScreeningQuestionTypeEnum: - enum: - - DATE - - FILE - - SINGLE_SELECT - - MULTI_SELECT - - SINGLE_LINE_TEXT - - MULTI_LINE_TEXT - - NUMERIC - - BOOLEAN - docs: |- - * `DATE` - DATE - * `FILE` - FILE - * `SINGLE_SELECT` - SINGLE_SELECT - * `MULTI_SELECT` - MULTI_SELECT - * `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT - * `MULTI_LINE_TEXT` - MULTI_LINE_TEXT - * `NUMERIC` - NUMERIC - * `BOOLEAN` - BOOLEAN - source: - openapi: ats_v3.yml - SelectiveSyncConfigurationsUsageEnum: - enum: - - IN_NEXT_SYNC - - IN_LAST_SYNC - docs: |- - * `IN_NEXT_SYNC` - IN_NEXT_SYNC - * `IN_LAST_SYNC` - IN_LAST_SYNC - source: - openapi: ats_v3.yml - StatusFd5Enum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - docs: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - source: - openapi: ats_v3.yml - SyncStatusLastSyncResult: - discriminated: false - union: - - LastSyncResultEnum - - string - source: - openapi: ats_v3.yml - inline: true - SyncStatusStatus: - discriminated: false - union: - - StatusFd5Enum - - string - source: - openapi: ats_v3.yml - inline: true - SyncStatus: - docs: >- - # The SyncStatus Object - - ### Description - - The `SyncStatus` object is used to represent the syncing state of an - account - - - ### Usage Example - - View the `SyncStatus` for an account to see how recently its models were - synced. - properties: - model_name: string - model_id: string - last_sync_start: optional - next_sync_start: optional - last_sync_result: optional - last_sync_finished: optional - status: SyncStatusStatus - is_initial_sync: boolean - selective_sync_configurations_usage: optional - source: - openapi: ats_v3.yml - Tag: - docs: >- - # The Tag Object - - ### Description - - The `Tag` object is used to represent a tag for a candidate. - - ### Usage Example - - Fetch from the `LIST Tags` endpoint and view the tags used within a - company. - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The tag's name. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: optional>>> - source: - openapi: ats_v3.yml - UrlUrlType: - discriminated: false - docs: |- - The type of site. - - * `PERSONAL` - PERSONAL - * `COMPANY` - COMPANY - * `PORTFOLIO` - PORTFOLIO - * `BLOG` - BLOG - * `SOCIAL_MEDIA` - SOCIAL_MEDIA - * `OTHER` - OTHER - * `JOB_POSTING` - JOB_POSTING - union: - - UrlTypeEnum - - string - source: - openapi: ats_v3.yml - inline: true - Url: - docs: >- - # The Url Object - - ### Description - - The `Url` object is used to represent hyperlinks associated with the - parent model. - - ### Usage Example - - Fetch from the `GET Candidate` endpoint and view their website urls. - properties: - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - value: - type: optional - docs: The site's url. - validation: - format: uri - maxLength: 2000 - url_type: - type: optional - docs: |- - The type of site. - - * `PERSONAL` - PERSONAL - * `COMPANY` - COMPANY - * `PORTFOLIO` - PORTFOLIO - * `BLOG` - BLOG - * `SOCIAL_MEDIA` - SOCIAL_MEDIA - * `OTHER` - OTHER - * `JOB_POSTING` - JOB_POSTING - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - source: - openapi: ats_v3.yml - UrlRequestUrlType: - discriminated: false - docs: |- - The type of site. - - * `PERSONAL` - PERSONAL - * `COMPANY` - COMPANY - * `PORTFOLIO` - PORTFOLIO - * `BLOG` - BLOG - * `SOCIAL_MEDIA` - SOCIAL_MEDIA - * `OTHER` - OTHER - * `JOB_POSTING` - JOB_POSTING - union: - - UrlTypeEnum - - string - source: - openapi: ats_v3.yml - inline: true - UrlRequest: - docs: >- - # The Url Object - - ### Description - - The `Url` object is used to represent hyperlinks associated with the - parent model. - - ### Usage Example - - Fetch from the `GET Candidate` endpoint and view their website urls. - properties: - value: - type: optional - docs: The site's url. - validation: - format: uri - maxLength: 2000 - url_type: - type: optional - docs: |- - The type of site. - - * `PERSONAL` - PERSONAL - * `COMPANY` - COMPANY - * `PORTFOLIO` - PORTFOLIO - * `BLOG` - BLOG - * `SOCIAL_MEDIA` - SOCIAL_MEDIA - * `OTHER` - OTHER - * `JOB_POSTING` - JOB_POSTING - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: ats_v3.yml - UrlTypeEnum: - enum: - - PERSONAL - - COMPANY - - PORTFOLIO - - BLOG - - SOCIAL_MEDIA - - OTHER - - JOB_POSTING - docs: |- - * `PERSONAL` - PERSONAL - * `COMPANY` - COMPANY - * `PORTFOLIO` - PORTFOLIO - * `BLOG` - BLOG - * `SOCIAL_MEDIA` - SOCIAL_MEDIA - * `OTHER` - OTHER - * `JOB_POSTING` - JOB_POSTING - source: - openapi: ats_v3.yml - ValidationProblemSource: - properties: - pointer: string - source: - openapi: ats_v3.yml - VeteranStatusEnum: - enum: - - I_AM_NOT_A_PROTECTED_VETERAN - - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN - - I_DONT_WISH_TO_ANSWER - docs: >- - * `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN - - * - `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` - - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN - - * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER - source: - openapi: ats_v3.yml - VisibilityEnum: - enum: - - ADMIN_ONLY - - PUBLIC - - PRIVATE - docs: |- - * `ADMIN_ONLY` - ADMIN_ONLY - * `PUBLIC` - PUBLIC - * `PRIVATE` - PRIVATE - source: - openapi: ats_v3.yml - WarningValidationProblem: - properties: - source: optional - title: string - detail: string - problem_type: string - source: - openapi: ats_v3.yml - WebhookReceiver: - properties: - event: string - is_active: boolean - key: optional - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/accountDetails.yml b/.mock/definition/ATS/accountDetails.yml deleted file mode 100644 index 48428454c..000000000 --- a/.mock/definition/ATS/accountDetails.yml +++ /dev/null @@ -1,38 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /ats/v1/account-details - method: GET - auth: - - tokenAuth: [] - docs: Get details for a linked account. - source: - openapi: ats_v3.yml - response: - docs: '' - type: atsRoot.AccountDetails - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - integration: BambooHR - integration_slug: bamboohr - category: hris - end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - end_user_organization_name: Waystar Royco - end_user_email_address: kendall.roy@waystar-royco.com - status: COMPLETE - webhook_listener_url: >- - https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: true - account_type: PRODUCTION - completed_at: '2024-08-26T20:11:19Z' - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/accountToken.yml b/.mock/definition/ATS/accountToken.yml deleted file mode 100644 index ae8d93094..000000000 --- a/.mock/definition/ATS/accountToken.yml +++ /dev/null @@ -1,47 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /ats/v1/account-token/{public_token} - method: GET - auth: - - tokenAuth: [] - docs: >- - Returns the account token for the end user with the provided public - token. - source: - openapi: ats_v3.yml - path-parameters: - public_token: string - response: - docs: '' - type: atsRoot.AccountToken - status-code: 200 - examples: - - path-parameters: - public_token: public_token - headers: - X-Account-Token: '[object Object]' - response: - body: - account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB - integration: - name: name - abbreviated_name: abbreviated_name - categories: - - hris - image: image - square_image: square_image - color: color - slug: slug - api_endpoints_to_documentation_urls: - key: value - webhook_setup_guide_url: webhook_setup_guide_url - category_beta_status: - key: value - id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/activities.yml b/.mock/definition/ATS/activities.yml deleted file mode 100644 index 99b916b4c..000000000 --- a/.mock/definition/ATS/activities.yml +++ /dev/null @@ -1,510 +0,0 @@ -types: - ActivitiesListRequestRemoteFields: - enum: - - activity_type - - value: activity_type,visibility - name: ActivityTypeVisibility - - visibility - source: - openapi: ats_v3.yml - ActivitiesListRequestShowEnumOrigins: - enum: - - activity_type - - value: activity_type,visibility - name: ActivityTypeVisibility - - visibility - source: - openapi: ats_v3.yml - ActivitiesRetrieveRequestRemoteFields: - enum: - - activity_type - - value: activity_type,visibility - name: ActivityTypeVisibility - - visibility - source: - openapi: ats_v3.yml - ActivitiesRetrieveRequestShowEnumOrigins: - enum: - - activity_type - - value: activity_type,visibility - name: ActivityTypeVisibility - - visibility - source: - openapi: ats_v3.yml -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/activities - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Activity` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: ActivitiesListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - user_id: - type: optional - docs: If provided, will only return activities done by this user. - response: - docs: '' - type: atsRoot.PaginatedActivityList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_fields: activity_type - remote_id: remote_id - show_enum_origins: activity_type - user_id: user_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '198123' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - user: user - remote_created_at: '2021-10-15T00:00:00Z' - activity_type: NOTE - subject: Gil Feig's interview - body: Candidate loves integrations! - visibility: ADMIN_ONLY - candidate: 550e8400-e29b-41d4-a716-446655440000 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - create: - path: /ats/v1/activities - method: POST - auth: - - tokenAuth: [] - docs: Creates an `Activity` object with the given values. - source: - openapi: ats_v3.yml - request: - name: ActivityEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: atsRoot.ActivityRequest - remote_user_id: string - content-type: application/json - response: - docs: '' - type: atsRoot.ActivityResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - remote_user_id: remote_user_id - response: - body: - model: - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '198123' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - user: user - remote_created_at: '2021-10-15T00:00:00Z' - activity_type: NOTE - subject: Gil Feig's interview - body: Candidate loves integrations! - visibility: ADMIN_ONLY - candidate: 550e8400-e29b-41d4-a716-446655440000 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /ats/v1/activities/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Activity` object with the given `id`. - source: - openapi: ats_v3.yml - path-parameters: - id: string - request: - name: ActivitiesRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: atsRoot.Activity - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: activity_type - show_enum_origins: activity_type - headers: - X-Account-Token: X-Account-Token - response: - body: - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '198123' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - user: user - remote_created_at: '2021-10-15T00:00:00Z' - activity_type: NOTE - subject: Gil Feig's interview - body: Candidate loves integrations! - visibility: ADMIN_ONLY - candidate: 550e8400-e29b-41d4-a716-446655440000 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - metaPostRetrieve: - path: /ats/v1/activities/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Activity` POSTs. - source: - openapi: ats_v3.yml - response: - docs: '' - type: atsRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/applications.yml b/.mock/definition/ATS/applications.yml deleted file mode 100644 index c0347b5d3..000000000 --- a/.mock/definition/ATS/applications.yml +++ /dev/null @@ -1,639 +0,0 @@ -types: - ApplicationsListRequestExpandItem: - enum: - - candidate - - credited_to - - current_stage - - job - - offers - - reject_reason - - screening_question_answers - - value: screening_question_answers.question - name: ScreeningQuestionAnswersQuestion - source: - openapi: ats_v3.yml - ApplicationsRetrieveRequestExpandItem: - enum: - - candidate - - credited_to - - current_stage - - job - - offers - - reject_reason - - screening_question_answers - - value: screening_question_answers.question - name: ScreeningQuestionAnswersQuestion - source: - openapi: ats_v3.yml -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/applications - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Application` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: ApplicationsListRequest - query-parameters: - candidate_id: - type: optional - docs: If provided, will only return applications for this candidate. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - credited_to_id: - type: optional - docs: If provided, will only return applications credited to this user. - current_stage_id: - type: optional - docs: >- - If provided, will only return applications at this interview - stage. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - job_id: - type: optional - docs: If provided, will only return applications for this job. - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - reject_reason_id: - type: optional - docs: >- - If provided, will only return applications with this reject - reason. - remote_id: - type: optional - docs: The API provider's ID for the given object. - source: - type: optional - docs: If provided, will only return applications with this source. - response: - docs: '' - type: atsRoot.PaginatedApplicationList - status-code: 200 - examples: - - query-parameters: - candidate_id: candidate_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - credited_to_id: credited_to_id - current_stage_id: current_stage_id - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - job_id: job_id - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - reject_reason_id: reject_reason_id - remote_id: remote_id - source: source - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 92e8a369-fffe-430d-b93a-f7e8a16563f1 - remote_id: '98796' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - candidate: candidate - job: job - applied_at: '2021-10-15T00:00:00Z' - rejected_at: '2021-11-15T00:00:00Z' - offers: - - e9b5c11d-c588-468e-8567-cd6992e42b62 - source: Campus recruiting event - credited_to: credited_to - screening_question_answers: - - screening_question_answers - - screening_question_answers - current_stage: current_stage - reject_reason: reject_reason - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /candidacies - data: - - Varies by platform - create: - path: /ats/v1/applications - method: POST - auth: - - tokenAuth: [] - docs: > - Creates an `Application` object with the given values. - - For certain integrations, but not all, our API detects duplicate - candidates and will associate applications with existing records in the - third-party. New candidates are created and automatically linked to the - application. - - - See our [Help Center - article](https://help.merge.dev/en/articles/10012366-updates-to-post-applications-oct-2024) - for detailed support per integration. - source: - openapi: ats_v3.yml - request: - name: ApplicationEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: atsRoot.ApplicationRequest - remote_user_id: string - content-type: application/json - response: - docs: '' - type: atsRoot.ApplicationResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - remote_user_id: remote_user_id - response: - body: - model: - id: 92e8a369-fffe-430d-b93a-f7e8a16563f1 - remote_id: '98796' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - candidate: candidate - job: job - applied_at: '2021-10-15T00:00:00Z' - rejected_at: '2021-11-15T00:00:00Z' - offers: - - e9b5c11d-c588-468e-8567-cd6992e42b62 - source: Campus recruiting event - credited_to: credited_to - screening_question_answers: - - screening_question_answers - - screening_question_answers - current_stage: current_stage - reject_reason: reject_reason - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /candidacies - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /ats/v1/applications/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Application` object with the given `id`. - source: - openapi: ats_v3.yml - path-parameters: - id: string - request: - name: ApplicationsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: atsRoot.Application - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 92e8a369-fffe-430d-b93a-f7e8a16563f1 - remote_id: '98796' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - candidate: candidate - job: job - applied_at: '2021-10-15T00:00:00Z' - rejected_at: '2021-11-15T00:00:00Z' - offers: - - e9b5c11d-c588-468e-8567-cd6992e42b62 - source: Campus recruiting event - credited_to: credited_to - screening_question_answers: - - screening_question_answers - - screening_question_answers - current_stage: current_stage - reject_reason: reject_reason - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /candidacies - data: - - Varies by platform - changeStageCreate: - path: /ats/v1/applications/{id}/change-stage - method: POST - auth: - - tokenAuth: [] - docs: Updates the `current_stage` field of an `Application` object - source: - openapi: ats_v3.yml - path-parameters: - id: string - request: - name: UpdateApplicationStageRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - job_interview_stage: - type: optional - docs: The interview stage to move the application to. - validation: - format: uuid - remote_user_id: - type: optional - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: atsRoot.ApplicationResponse - status-code: 201 - examples: - - path-parameters: - id: id - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: {} - response: - body: - model: - id: 92e8a369-fffe-430d-b93a-f7e8a16563f1 - remote_id: '98796' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - candidate: candidate - job: job - applied_at: '2021-10-15T00:00:00Z' - rejected_at: '2021-11-15T00:00:00Z' - offers: - - e9b5c11d-c588-468e-8567-cd6992e42b62 - source: Campus recruiting event - credited_to: credited_to - screening_question_answers: - - screening_question_answers - - screening_question_answers - current_stage: current_stage - reject_reason: reject_reason - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /candidacies - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - metaPostRetrieve: - path: /ats/v1/applications/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Application` POSTs. - source: - openapi: ats_v3.yml - request: - name: ApplicationsMetaPostRetrieveRequest - query-parameters: - application_remote_template_id: - type: optional - docs: >- - The template ID associated with the nested application in the - request. - response: - docs: '' - type: atsRoot.MetaResponse - status-code: 200 - examples: - - query-parameters: - application_remote_template_id: application_remote_template_id - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/asyncPassthrough.yml b/.mock/definition/ATS/asyncPassthrough.yml deleted file mode 100644 index b84e9da2a..000000000 --- a/.mock/definition/ATS/asyncPassthrough.yml +++ /dev/null @@ -1,74 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /ats/v1/async-passthrough - method: POST - auth: - - tokenAuth: [] - docs: >- - Asynchronously pull data from an endpoint not currently supported by - Merge. - source: - openapi: ats_v3.yml - request: - body: atsRoot.DataPassthroughRequest - content-type: application/json - response: - docs: '' - type: atsRoot.AsyncPassthroughReciept - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - method: GET - path: /scooters - response: - body: - async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd - retrieve: - path: /ats/v1/async-passthrough/{async_passthrough_receipt_id} - method: GET - auth: - - tokenAuth: [] - docs: Retrieves data from earlier async-passthrough POST request - source: - openapi: ats_v3.yml - path-parameters: - async_passthrough_receipt_id: string - response: - docs: '' - type: AsyncPassthroughRetrieveResponse - status-code: 200 - examples: - - path-parameters: - async_passthrough_receipt_id: async_passthrough_receipt_id - headers: - X-Account-Token: X-Account-Token - response: - body: - method: GET - path: /scooters - status: 200 - response: - key: value - response_headers: - X-Page-Token: value - response_type: JSON - headers: - EXTRA-HEADER: value - Authorization: - source: - openapi: ats_v3.yml -types: - AsyncPassthroughRetrieveResponse: - discriminated: false - union: - - atsRoot.RemoteResponse - - string - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/attachments.yml b/.mock/definition/ATS/attachments.yml deleted file mode 100644 index 61e0a1e1e..000000000 --- a/.mock/definition/ATS/attachments.yml +++ /dev/null @@ -1,468 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/attachments - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Attachment` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: AttachmentsListRequest - query-parameters: - candidate_id: - type: optional - docs: If provided, will only return attachments for this candidate. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: atsRoot.PaginatedAttachmentList - status-code: 200 - examples: - - query-parameters: - candidate_id: candidate_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_fields: attachment_type - remote_id: remote_id - show_enum_origins: attachment_type - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: c640b80b-fac9-409f-aa19-1f9221aec445 - remote_id: '11167' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - file_name: Candidate Resume - file_url: http://alturl.com/p749b - candidate: 2872ba14-4084-492b-be96-e5eee6fc33ef - attachment_type: RESUME - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /attachments - data: - - Varies by platform - create: - path: /ats/v1/attachments - method: POST - auth: - - tokenAuth: [] - docs: Creates an `Attachment` object with the given values. - source: - openapi: ats_v3.yml - request: - name: AttachmentEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: atsRoot.AttachmentRequest - remote_user_id: string - content-type: application/json - response: - docs: '' - type: atsRoot.AttachmentResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - remote_user_id: remote_user_id - response: - body: - model: - id: c640b80b-fac9-409f-aa19-1f9221aec445 - remote_id: '11167' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - file_name: Candidate Resume - file_url: http://alturl.com/p749b - candidate: 2872ba14-4084-492b-be96-e5eee6fc33ef - attachment_type: RESUME - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /attachments - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /ats/v1/attachments/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Attachment` object with the given `id`. - source: - openapi: ats_v3.yml - path-parameters: - id: string - request: - name: AttachmentsRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: atsRoot.Attachment - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: attachment_type - show_enum_origins: attachment_type - headers: - X-Account-Token: X-Account-Token - response: - body: - id: c640b80b-fac9-409f-aa19-1f9221aec445 - remote_id: '11167' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - file_name: Candidate Resume - file_url: http://alturl.com/p749b - candidate: 2872ba14-4084-492b-be96-e5eee6fc33ef - attachment_type: RESUME - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /attachments - data: - - Varies by platform - metaPostRetrieve: - path: /ats/v1/attachments/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Attachment` POSTs. - source: - openapi: ats_v3.yml - response: - docs: '' - type: atsRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/auditTrail.yml b/.mock/definition/ATS/auditTrail.yml deleted file mode 100644 index 3a53d381f..000000000 --- a/.mock/definition/ATS/auditTrail.yml +++ /dev/null @@ -1,108 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/audit-trail - method: GET - auth: - - tokenAuth: [] - docs: Gets a list of audit trail events. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: AuditTrailListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - end_date: - type: optional - docs: >- - If included, will only include audit trail events that occurred - before this time - event_type: - type: optional - docs: >- - If included, will only include events with the given event type. - Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, - `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, - `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, - `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, - `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, - `DELETED_LINKED_ACCOUNT`, - `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, - `CREATED_DESTINATION`, `DELETED_DESTINATION`, - `CHANGED_DESTINATION`, `CHANGED_SCOPES`, - `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, - `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, - `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, - `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, - `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, - `END_USER_CREDENTIALS_ACCESSED` - page_size: - type: optional - docs: Number of results to return per page. - start_date: - type: optional - docs: >- - If included, will only include audit trail events that occurred - after this time - user_email: - type: optional - docs: >- - If provided, this will return events associated with the specified - user email. Please note that the email address reflects the user's - email at the time of the event, and may not be their current - email. - response: - docs: '' - type: atsRoot.PaginatedAuditLogEventList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_date: end_date - event_type: event_type - page_size: 1 - start_date: start_date - user_email: user_email - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: b5ceea2a-7171-47ce-8090-165cfce5572c - user_name: Gil Feig - user_email: hello@merge.dev - role: ADMIN - ip_address: 192.0.2.123 - event_type: CREATED_REMOTE_PRODUCTION_API_KEY - event_description: >- - Organization-wide Scopes for model hris.Employee updated - from Read to Read+Write - created_at: '2024-01-15T09:30:00Z' - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/availableActions.yml b/.mock/definition/ATS/availableActions.yml deleted file mode 100644 index 7cc26f4d9..000000000 --- a/.mock/definition/ATS/availableActions.yml +++ /dev/null @@ -1,52 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /ats/v1/available-actions - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of models and actions available for an account. - source: - openapi: ats_v3.yml - response: - docs: '' - type: atsRoot.AvailableActions - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - integration: - name: name - abbreviated_name: abbreviated_name - categories: - - hris - image: image - square_image: square_image - color: color - slug: slug - api_endpoints_to_documentation_urls: - key: value - webhook_setup_guide_url: webhook_setup_guide_url - category_beta_status: - key: value - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/candidates.yml b/.mock/definition/ATS/candidates.yml deleted file mode 100644 index a757ff051..000000000 --- a/.mock/definition/ATS/candidates.yml +++ /dev/null @@ -1,900 +0,0 @@ -types: - CandidatesListRequestExpandItem: - enum: - - applications - - attachments - source: - openapi: ats_v3.yml - CandidatesRetrieveRequestExpandItem: - enum: - - applications - - attachments - source: - openapi: ats_v3.yml -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/candidates - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Candidate` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: CandidatesListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - email_addresses: - type: optional - docs: >- - If provided, will only return candidates with these email - addresses; multiple addresses can be separated by commas. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - first_name: - type: optional - docs: If provided, will only return candidates with this first name. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - last_name: - type: optional - docs: If provided, will only return candidates with this last name. - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - tags: - type: optional - docs: >- - If provided, will only return candidates with these tags; multiple - tags can be separated by commas. - response: - docs: '' - type: atsRoot.PaginatedCandidateList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - email_addresses: email_addresses - first_name: first_name - include_deleted_data: true - include_remote_data: true - include_shell_data: true - last_name: last_name - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - tags: tags - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 521b18c2-4d01-4297-b451-19858d07c133 - remote_id: '21198' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - first_name: Gil - last_name: Feig - company: Columbia Dining App. - title: Software Engineer - remote_created_at: '2021-10-15T00:00:00Z' - remote_updated_at: '2021-10-16T00:00:00Z' - last_interaction_at: '2021-10-17T00:00:00Z' - is_private: true - can_email: true - locations: - - San Francisco - - New York - - Miami - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - value: '+1234567890' - phone_number_type: MOBILE - email_addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - value: hello@merge.dev - email_address_type: PERSONAL - urls: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - value: http://alturl.com/p749b - url_type: BLOG - tags: - - High-Priority - applications: - - 29eb9867-ce2a-403f-b8ce-f2844b89f078 - - b4d08e5c-de00-4d64-a29f-66addac9af99 - - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 - attachments: - - bea08964-32b4-4a20-8bb4-2612ba09de1d - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /candidates - data: - - Varies by platform - create: - path: /ats/v1/candidates - method: POST - auth: - - tokenAuth: [] - docs: Creates a `Candidate` object with the given values. - source: - openapi: ats_v3.yml - request: - name: CandidateEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: atsRoot.CandidateRequest - remote_user_id: string - content-type: application/json - response: - docs: '' - type: atsRoot.CandidateResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - remote_user_id: remote_user_id - response: - body: - model: - id: 521b18c2-4d01-4297-b451-19858d07c133 - remote_id: '21198' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - first_name: Gil - last_name: Feig - company: Columbia Dining App. - title: Software Engineer - remote_created_at: '2021-10-15T00:00:00Z' - remote_updated_at: '2021-10-16T00:00:00Z' - last_interaction_at: '2021-10-17T00:00:00Z' - is_private: true - can_email: true - locations: - - San Francisco - - New York - - Miami - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - value: '+1234567890' - phone_number_type: MOBILE - email_addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - value: hello@merge.dev - email_address_type: PERSONAL - urls: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - value: http://alturl.com/p749b - url_type: BLOG - tags: - - High-Priority - applications: - - 29eb9867-ce2a-403f-b8ce-f2844b89f078 - - b4d08e5c-de00-4d64-a29f-66addac9af99 - - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 - attachments: - - bea08964-32b4-4a20-8bb4-2612ba09de1d - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /candidates - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /ats/v1/candidates/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Candidate` object with the given `id`. - source: - openapi: ats_v3.yml - path-parameters: - id: string - request: - name: CandidatesRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: atsRoot.Candidate - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 521b18c2-4d01-4297-b451-19858d07c133 - remote_id: '21198' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - first_name: Gil - last_name: Feig - company: Columbia Dining App. - title: Software Engineer - remote_created_at: '2021-10-15T00:00:00Z' - remote_updated_at: '2021-10-16T00:00:00Z' - last_interaction_at: '2021-10-17T00:00:00Z' - is_private: true - can_email: true - locations: - - San Francisco - - New York - - Miami - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - value: '+1234567890' - phone_number_type: MOBILE - remote_was_deleted: true - email_addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - value: hello@merge.dev - email_address_type: PERSONAL - remote_was_deleted: true - urls: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - value: http://alturl.com/p749b - url_type: BLOG - remote_was_deleted: true - tags: - - High-Priority - applications: - - 29eb9867-ce2a-403f-b8ce-f2844b89f078 - - b4d08e5c-de00-4d64-a29f-66addac9af99 - - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 - attachments: - - bea08964-32b4-4a20-8bb4-2612ba09de1d - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /candidates - data: - - Varies by platform - partialUpdate: - path: /ats/v1/candidates/{id} - method: PATCH - auth: - - tokenAuth: [] - docs: Updates a `Candidate` object with the given `id`. - source: - openapi: ats_v3.yml - path-parameters: - id: string - request: - name: PatchedCandidateEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: atsRoot.PatchedCandidateRequest - remote_user_id: string - content-type: application/json - response: - docs: '' - type: atsRoot.CandidateResponse - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - remote_user_id: remote_user_id - response: - body: - model: - id: 521b18c2-4d01-4297-b451-19858d07c133 - remote_id: '21198' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - first_name: Gil - last_name: Feig - company: Columbia Dining App. - title: Software Engineer - remote_created_at: '2021-10-15T00:00:00Z' - remote_updated_at: '2021-10-16T00:00:00Z' - last_interaction_at: '2021-10-17T00:00:00Z' - is_private: true - can_email: true - locations: - - San Francisco - - New York - - Miami - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - value: '+1234567890' - phone_number_type: MOBILE - email_addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - value: hello@merge.dev - email_address_type: PERSONAL - urls: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - value: http://alturl.com/p749b - url_type: BLOG - tags: - - High-Priority - applications: - - 29eb9867-ce2a-403f-b8ce-f2844b89f078 - - b4d08e5c-de00-4d64-a29f-66addac9af99 - - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 - attachments: - - bea08964-32b4-4a20-8bb4-2612ba09de1d - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /candidates - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - ignoreCreate: - path: /ats/v1/candidates/ignore/{model_id} - method: POST - auth: - - tokenAuth: [] - docs: >- - Ignores a specific row based on the `model_id` in the url. These records - will have their properties set to null, and will not be updated in - future syncs. The "reason" and "message" fields in the request body will - be stored for audit purposes. - source: - openapi: ats_v3.yml - path-parameters: - model_id: string - request: - body: atsRoot.IgnoreCommonModelRequest - content-type: application/json - examples: - - path-parameters: - model_id: model_id - headers: - X-Account-Token: X-Account-Token - request: - reason: GENERAL_CUSTOMER_REQUEST - metaPatchRetrieve: - path: /ats/v1/candidates/meta/patch/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Candidate` PATCHs. - source: - openapi: ats_v3.yml - path-parameters: - id: string - response: - docs: '' - type: atsRoot.MetaResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - metaPostRetrieve: - path: /ats/v1/candidates/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Candidate` POSTs. - source: - openapi: ats_v3.yml - response: - docs: '' - type: atsRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/deleteAccount.yml b/.mock/definition/ATS/deleteAccount.yml deleted file mode 100644 index b902b54e2..000000000 --- a/.mock/definition/ATS/deleteAccount.yml +++ /dev/null @@ -1,17 +0,0 @@ -service: - auth: false - base-path: '' - endpoints: - delete: - path: /ats/v1/delete-account - method: POST - auth: - - tokenAuth: [] - docs: Delete a linked account. - source: - openapi: ats_v3.yml - examples: - - headers: - X-Account-Token: X-Account-Token - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/departments.yml b/.mock/definition/ATS/departments.yml deleted file mode 100644 index d8eee7ec7..000000000 --- a/.mock/definition/ATS/departments.yml +++ /dev/null @@ -1,158 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/departments - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Department` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: DepartmentsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: atsRoot.PaginatedDepartmentList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - remote_id: '23456' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Engineering - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /departments - data: - - Varies by platform - retrieve: - path: /ats/v1/departments/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Department` object with the given `id`. - source: - openapi: ats_v3.yml - path-parameters: - id: string - request: - name: DepartmentsRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: atsRoot.Department - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - remote_id: '23456' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Engineering - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /departments - data: - - Varies by platform - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/eeocs.yml b/.mock/definition/ATS/eeocs.yml deleted file mode 100644 index a5b85dc56..000000000 --- a/.mock/definition/ATS/eeocs.yml +++ /dev/null @@ -1,329 +0,0 @@ -types: - EeocsListRequestRemoteFields: - enum: - - disability_status - - value: disability_status,gender - name: DisabilityStatusGender - - value: disability_status,gender,race - name: DisabilityStatusGenderRace - - value: disability_status,gender,race,veteran_status - name: DisabilityStatusGenderRaceVeteranStatus - - value: disability_status,gender,veteran_status - name: DisabilityStatusGenderVeteranStatus - - value: disability_status,race - name: DisabilityStatusRace - - value: disability_status,race,veteran_status - name: DisabilityStatusRaceVeteranStatus - - value: disability_status,veteran_status - name: DisabilityStatusVeteranStatus - - gender - - value: gender,race - name: GenderRace - - value: gender,race,veteran_status - name: GenderRaceVeteranStatus - - value: gender,veteran_status - name: GenderVeteranStatus - - race - - value: race,veteran_status - name: RaceVeteranStatus - - veteran_status - source: - openapi: ats_v3.yml - EeocsListRequestShowEnumOrigins: - enum: - - disability_status - - value: disability_status,gender - name: DisabilityStatusGender - - value: disability_status,gender,race - name: DisabilityStatusGenderRace - - value: disability_status,gender,race,veteran_status - name: DisabilityStatusGenderRaceVeteranStatus - - value: disability_status,gender,veteran_status - name: DisabilityStatusGenderVeteranStatus - - value: disability_status,race - name: DisabilityStatusRace - - value: disability_status,race,veteran_status - name: DisabilityStatusRaceVeteranStatus - - value: disability_status,veteran_status - name: DisabilityStatusVeteranStatus - - gender - - value: gender,race - name: GenderRace - - value: gender,race,veteran_status - name: GenderRaceVeteranStatus - - value: gender,veteran_status - name: GenderVeteranStatus - - race - - value: race,veteran_status - name: RaceVeteranStatus - - veteran_status - source: - openapi: ats_v3.yml - EeocsRetrieveRequestRemoteFields: - enum: - - disability_status - - value: disability_status,gender - name: DisabilityStatusGender - - value: disability_status,gender,race - name: DisabilityStatusGenderRace - - value: disability_status,gender,race,veteran_status - name: DisabilityStatusGenderRaceVeteranStatus - - value: disability_status,gender,veteran_status - name: DisabilityStatusGenderVeteranStatus - - value: disability_status,race - name: DisabilityStatusRace - - value: disability_status,race,veteran_status - name: DisabilityStatusRaceVeteranStatus - - value: disability_status,veteran_status - name: DisabilityStatusVeteranStatus - - gender - - value: gender,race - name: GenderRace - - value: gender,race,veteran_status - name: GenderRaceVeteranStatus - - value: gender,veteran_status - name: GenderVeteranStatus - - race - - value: race,veteran_status - name: RaceVeteranStatus - - veteran_status - source: - openapi: ats_v3.yml - EeocsRetrieveRequestShowEnumOrigins: - enum: - - disability_status - - value: disability_status,gender - name: DisabilityStatusGender - - value: disability_status,gender,race - name: DisabilityStatusGenderRace - - value: disability_status,gender,race,veteran_status - name: DisabilityStatusGenderRaceVeteranStatus - - value: disability_status,gender,veteran_status - name: DisabilityStatusGenderVeteranStatus - - value: disability_status,race - name: DisabilityStatusRace - - value: disability_status,race,veteran_status - name: DisabilityStatusRaceVeteranStatus - - value: disability_status,veteran_status - name: DisabilityStatusVeteranStatus - - gender - - value: gender,race - name: GenderRace - - value: gender,race,veteran_status - name: GenderRaceVeteranStatus - - value: gender,veteran_status - name: GenderVeteranStatus - - race - - value: race,veteran_status - name: RaceVeteranStatus - - veteran_status - source: - openapi: ats_v3.yml -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/eeocs - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `EEOC` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: EeocsListRequest - query-parameters: - candidate_id: - type: optional - docs: If provided, will only return EEOC info for this candidate. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: atsRoot.PaginatedEeocList - status-code: 200 - examples: - - query-parameters: - candidate_id: candidate_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_fields: disability_status - remote_id: remote_id - show_enum_origins: disability_status - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: f7dd7b4f-237e-4772-8bd4-3246384c6c58 - remote_id: '76' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - candidate: candidate - submitted_at: '2021-10-15T00:00:00Z' - race: AMERICAN_INDIAN_OR_ALASKAN_NATIVE - gender: MALE - veteran_status: I_AM_NOT_A_PROTECTED_VETERAN - disability_status: YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /eeoc - data: - - Varies by platform - retrieve: - path: /ats/v1/eeocs/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `EEOC` object with the given `id`. - source: - openapi: ats_v3.yml - path-parameters: - id: string - request: - name: EeocsRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: atsRoot.Eeoc - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: disability_status - show_enum_origins: disability_status - headers: - X-Account-Token: X-Account-Token - response: - body: - id: f7dd7b4f-237e-4772-8bd4-3246384c6c58 - remote_id: '76' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - candidate: candidate - submitted_at: '2021-10-15T00:00:00Z' - race: AMERICAN_INDIAN_OR_ALASKAN_NATIVE - gender: MALE - veteran_status: I_AM_NOT_A_PROTECTED_VETERAN - disability_status: YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /eeoc - data: - - Varies by platform - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/fieldMapping.yml b/.mock/definition/ATS/fieldMapping.yml deleted file mode 100644 index bda9917a7..000000000 --- a/.mock/definition/ATS/fieldMapping.yml +++ /dev/null @@ -1,911 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - field_mappings_retrieve: - path: /ats/v1/field-mappings - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all Field Mappings for this Linked Account. Field Mappings are - mappings between third-party Remote Fields and user defined Merge - fields. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - source: - openapi: ats_v3.yml - request: - name: FieldMappingsRetrieveRequest - query-parameters: - exclude_remote_field_metadata: - type: optional - docs: >- - If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and - `remote_fields.schema` will be null). This will increase the speed - of the request since these fields require some calculations. - response: - docs: '' - type: atsRoot.FieldMappingApiInstanceResponse - status-code: 200 - examples: - - query-parameters: - exclude_remote_field_metadata: true - headers: - X-Account-Token: X-Account-Token - response: - body: - Activity: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Application: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Attachment: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Candidate: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Department: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - EEOC: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - ScheduledInterview: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Job: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - JobPosting: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - JobInterviewStage: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Offer: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Office: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - RejectReason: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Scorecard: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Tag: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - RemoteUser: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - field_mappings_create: - path: /ats/v1/field-mappings - method: POST - auth: - - tokenAuth: [] - docs: >- - Create new Field Mappings that will be available after the next - scheduled sync. This will cause the next sync for this Linked Account to - sync **ALL** data from start. - source: - openapi: ats_v3.yml - request: - name: CreateFieldMappingRequest - query-parameters: - exclude_remote_field_metadata: - type: optional - docs: >- - If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and - `remote_fields.schema` will be null). This will increase the speed - of the request since these fields require some calculations. - body: - properties: - target_field_name: - type: string - docs: >- - The name of the target field you want this remote field to map - to. - validation: - minLength: 1 - target_field_description: - type: string - docs: >- - The description of the target field you want this remote field - to map to. - validation: - minLength: 1 - remote_field_traversal_path: - docs: >- - The field traversal path of the remote field listed when you hit - the GET /remote-fields endpoint. - type: list - remote_method: - type: string - docs: >- - The method of the remote endpoint where the remote field is - coming from. - validation: - minLength: 1 - remote_url_path: - type: string - docs: >- - The path of the remote endpoint where the remote field is coming - from. - validation: - minLength: 1 - common_model_name: - type: string - docs: >- - The name of the Common Model that the remote field corresponds - to in a given category. - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: atsRoot.FieldMappingInstanceResponse - status-code: 201 - examples: - - query-parameters: - exclude_remote_field_metadata: true - headers: - X-Account-Token: X-Account-Token - request: - target_field_name: example_target_field_name - target_field_description: this is a example description of the target field - remote_field_traversal_path: - - example_remote_field - remote_method: GET - remote_url_path: /example-url-path - common_model_name: ExampleCommonModel - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - field_mappings_destroy: - path: /ats/v1/field-mappings/{field_mapping_id} - method: DELETE - auth: - - tokenAuth: [] - docs: >- - Deletes Field Mappings for a Linked Account. All data related to this - Field Mapping will be deleted and these changes will be reflected after - the next scheduled sync. This will cause the next sync for this Linked - Account to sync **ALL** data from start. - source: - openapi: ats_v3.yml - path-parameters: - field_mapping_id: string - response: - docs: '' - type: atsRoot.FieldMappingInstanceResponse - status-code: 204 - examples: - - path-parameters: - field_mapping_id: field_mapping_id - headers: - X-Account-Token: X-Account-Token - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - field_mappings_partial_update: - path: /ats/v1/field-mappings/{field_mapping_id} - method: PATCH - auth: - - tokenAuth: [] - docs: >- - Create or update existing Field Mappings for a Linked Account. Changes - will be reflected after the next scheduled sync. This will cause the - next sync for this Linked Account to sync **ALL** data from start. - source: - openapi: ats_v3.yml - path-parameters: - field_mapping_id: string - request: - name: PatchedEditFieldMappingRequest - body: - properties: - remote_field_traversal_path: - type: optional> - docs: >- - The field traversal path of the remote field listed when you hit - the GET /remote-fields endpoint. - remote_method: - type: optional - docs: >- - The method of the remote endpoint where the remote field is - coming from. - validation: - minLength: 1 - remote_url_path: - type: optional - docs: >- - The path of the remote endpoint where the remote field is coming - from. - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: atsRoot.FieldMappingInstanceResponse - status-code: 200 - examples: - - path-parameters: - field_mapping_id: field_mapping_id - headers: - X-Account-Token: X-Account-Token - request: {} - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - remote_fields_retrieve: - path: /ats/v1/remote-fields - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all remote fields for a Linked Account. Remote fields are - third-party fields that are accessible after initial sync if remote_data - is enabled. You can use remote fields to override existing Merge fields - or map a new Merge field. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - source: - openapi: ats_v3.yml - request: - name: RemoteFieldsRetrieveRequest - query-parameters: - common_models: - type: optional - docs: >- - A comma seperated list of Common Model names. If included, will - only return Remote Fields for those Common Models. - include_example_values: - type: optional - docs: >- - If true, will include example values, where available, for remote - fields in the 3rd party platform. These examples come from active - data from your customers. - response: - docs: '' - type: atsRoot.RemoteFieldApiResponse - status-code: 200 - examples: - - query-parameters: - common_models: common_models - include_example_values: include_example_values - headers: - X-Account-Token: X-Account-Token - response: - body: - Activity: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Application: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Attachment: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Candidate: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Department: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - EEOC: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - ScheduledInterview: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Job: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - JobPosting: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - JobInterviewStage: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Offer: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Office: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - RejectReason: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Scorecard: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Tag: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - RemoteUser: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - target_fields_retrieve: - path: /ats/v1/target-fields - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all organization-wide Target Fields, this will not include any - Linked Account specific Target Fields. Organization-wide Target Fields - are additional fields appended to the Merge Common Model for all Linked - Accounts in a category. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). - source: - openapi: ats_v3.yml - response: - docs: '' - type: atsRoot.ExternalTargetFieldApiResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - Activity: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Application: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Attachment: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Candidate: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Department: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - EEOC: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - ScheduledInterview: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Job: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - JobPosting: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - JobInterviewStage: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Offer: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Office: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - RejectReason: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Scorecard: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Tag: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - RemoteUser: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/forceResync.yml b/.mock/definition/ATS/forceResync.yml deleted file mode 100644 index c19f53b4d..000000000 --- a/.mock/definition/ATS/forceResync.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - sync_status_resync_create: - path: /ats/v1/sync-status/resync - method: POST - auth: - - tokenAuth: [] - docs: >- - Force re-sync of all models. This endpoint is available for monthly, - quarterly, and highest sync frequency customers on the Professional or - Enterprise plans. Doing so will consume a sync credit for the relevant - linked account. Force re-syncs can also be triggered manually in the - Merge Dashboard and is available for all customers. - source: - openapi: ats_v3.yml - response: - docs: '' - type: list - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - - model_name: Candidate - model_id: ats.Candidate - last_sync_start: '2021-03-30T19:44:18Z' - next_sync_start: '2021-03-30T20:44:18Z' - last_sync_result: SYNCING - last_sync_finished: '2021-03-30T19:55:18Z' - status: SYNCING - is_initial_sync: true - selective_sync_configurations_usage: IN_NEXT_SYNC - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/generateKey.yml b/.mock/definition/ATS/generateKey.yml deleted file mode 100644 index b9f011f38..000000000 --- a/.mock/definition/ATS/generateKey.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /ats/v1/generate-key - method: POST - auth: - - tokenAuth: [] - docs: Create a remote key. - source: - openapi: ats_v3.yml - request: - name: GenerateRemoteKeyRequest - body: - properties: - name: - type: string - docs: The name of the remote key - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: atsRoot.RemoteKey - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - name: Remote Deployment Key 1 - response: - body: - name: Remote Deployment Key 1 - key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/interviews.yml b/.mock/definition/ATS/interviews.yml deleted file mode 100644 index 9fb16f5dd..000000000 --- a/.mock/definition/ATS/interviews.yml +++ /dev/null @@ -1,521 +0,0 @@ -types: - InterviewsListRequestExpandItem: - enum: - - application - - interviewers - - job_interview_stage - - organizer - source: - openapi: ats_v3.yml - InterviewsRetrieveRequestExpandItem: - enum: - - application - - interviewers - - job_interview_stage - - organizer - source: - openapi: ats_v3.yml -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/interviews - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `ScheduledInterview` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: InterviewsListRequest - query-parameters: - application_id: - type: optional - docs: If provided, will only return interviews for this application. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - job_id: - type: optional - docs: If provided, wll only return interviews organized for this job. - job_interview_stage_id: - type: optional - docs: If provided, will only return interviews at this stage. - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - organizer_id: - type: optional - docs: If provided, will only return interviews organized by this user. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: atsRoot.PaginatedScheduledInterviewList - status-code: 200 - examples: - - query-parameters: - application_id: application_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - job_id: job_id - job_interview_stage_id: job_interview_stage_id - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - organizer_id: organizer_id - page_size: 1 - remote_fields: status - remote_id: remote_id - show_enum_origins: status - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: b8faf072-98b9-4445-8a9a-6b4950efca19 - remote_id: '3' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - application: application - job_interview_stage: job_interview_stage - organizer: organizer - interviewers: - - f9813dd5-e70b-484c-91d8-00acd6065b07 - - 89a86fcf-d540-4e6b-ac3d-ce07c4ec9b3c - location: Embarcadero Center 2 - start_at: '2021-10-15T00:00:00Z' - end_at: '2021-10-15T02:00:00Z' - remote_created_at: '2021-10-15T00:00:00Z' - remote_updated_at: '2021-10-15T00:00:00Z' - status: SCHEDULED - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /interviews - data: - - Varies by platform - create: - path: /ats/v1/interviews - method: POST - auth: - - tokenAuth: [] - docs: Creates a `ScheduledInterview` object with the given values. - source: - openapi: ats_v3.yml - request: - name: ScheduledInterviewEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: atsRoot.ScheduledInterviewRequest - remote_user_id: string - content-type: application/json - response: - docs: '' - type: atsRoot.ScheduledInterviewResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - remote_user_id: remote_user_id - response: - body: - model: - id: b8faf072-98b9-4445-8a9a-6b4950efca19 - remote_id: '3' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - application: application - job_interview_stage: job_interview_stage - organizer: organizer - interviewers: - - f9813dd5-e70b-484c-91d8-00acd6065b07 - - 89a86fcf-d540-4e6b-ac3d-ce07c4ec9b3c - location: Embarcadero Center 2 - start_at: '2021-10-15T00:00:00Z' - end_at: '2021-10-15T02:00:00Z' - remote_created_at: '2021-10-15T00:00:00Z' - remote_updated_at: '2021-10-15T00:00:00Z' - status: SCHEDULED - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /interviews - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /ats/v1/interviews/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `ScheduledInterview` object with the given `id`. - source: - openapi: ats_v3.yml - path-parameters: - id: string - request: - name: InterviewsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: atsRoot.ScheduledInterview - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: status - show_enum_origins: status - headers: - X-Account-Token: X-Account-Token - response: - body: - id: b8faf072-98b9-4445-8a9a-6b4950efca19 - remote_id: '3' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - application: application - job_interview_stage: job_interview_stage - organizer: organizer - interviewers: - - f9813dd5-e70b-484c-91d8-00acd6065b07 - - 89a86fcf-d540-4e6b-ac3d-ce07c4ec9b3c - location: Embarcadero Center 2 - start_at: '2021-10-15T00:00:00Z' - end_at: '2021-10-15T02:00:00Z' - remote_created_at: '2021-10-15T00:00:00Z' - remote_updated_at: '2021-10-15T00:00:00Z' - status: SCHEDULED - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /interviews - data: - - Varies by platform - metaPostRetrieve: - path: /ats/v1/interviews/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `ScheduledInterview` POSTs. - source: - openapi: ats_v3.yml - response: - docs: '' - type: atsRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/issues.yml b/.mock/definition/ATS/issues.yml deleted file mode 100644 index b446519fc..000000000 --- a/.mock/definition/ATS/issues.yml +++ /dev/null @@ -1,154 +0,0 @@ -types: - IssuesListRequestStatus: - enum: - - ONGOING - - RESOLVED - source: - openapi: ats_v3.yml -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/issues - method: GET - auth: - - tokenAuth: [] - docs: Gets all issues for Organization. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: IssuesListRequest - query-parameters: - account_token: optional - cursor: - type: optional - docs: The pagination cursor value. - end_date: - type: optional - docs: >- - If included, will only include issues whose most recent action - occurred before this time - end_user_organization_name: optional - first_incident_time_after: - type: optional - docs: >- - If provided, will only return issues whose first incident time was - after this datetime. - first_incident_time_before: - type: optional - docs: >- - If provided, will only return issues whose first incident time was - before this datetime. - include_muted: - type: optional - docs: If true, will include muted issues - integration_name: optional - last_incident_time_after: - type: optional - docs: >- - If provided, will only return issues whose last incident time was - after this datetime. - last_incident_time_before: - type: optional - docs: >- - If provided, will only return issues whose last incident time was - before this datetime. - linked_account_id: - type: optional - docs: >- - If provided, will only include issues pertaining to the linked - account passed in. - page_size: - type: optional - docs: Number of results to return per page. - start_date: - type: optional - docs: >- - If included, will only include issues whose most recent action - occurred after this time - status: - type: optional - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - response: - docs: '' - type: atsRoot.PaginatedIssueList - status-code: 200 - examples: - - query-parameters: - account_token: account_token - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_date: end_date - end_user_organization_name: end_user_organization_name - first_incident_time_after: '2024-01-15T09:30:00Z' - first_incident_time_before: '2024-01-15T09:30:00Z' - include_muted: include_muted - integration_name: integration_name - last_incident_time_after: '2024-01-15T09:30:00Z' - last_incident_time_before: '2024-01-15T09:30:00Z' - linked_account_id: linked_account_id - page_size: 1 - start_date: start_date - status: ONGOING - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: ONGOING - error_description: Missing Permissions - end_user: - key: value - first_incident_time: '2022-12-05T16:19:15Z' - last_incident_time: '2022-12-05T16:19:15Z' - is_muted: true - error_details: - - Missing employee permissions. - - Missing time off permissions. - retrieve: - path: /ats/v1/issues/{id} - method: GET - auth: - - tokenAuth: [] - docs: Get a specific issue. - source: - openapi: ats_v3.yml - path-parameters: - id: string - response: - docs: '' - type: atsRoot.Issue - status-code: 200 - examples: - - path-parameters: - id: id - headers: - X-Account-Token: '[object Object]' - response: - body: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: ONGOING - error_description: Missing Permissions - end_user: - key: value - first_incident_time: '2022-12-05T16:19:15Z' - last_incident_time: '2022-12-05T16:19:15Z' - is_muted: true - error_details: - - Missing employee permissions. - - Missing time off permissions. - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/jobInterviewStages.yml b/.mock/definition/ATS/jobInterviewStages.yml deleted file mode 100644 index 413ae6f94..000000000 --- a/.mock/definition/ATS/jobInterviewStages.yml +++ /dev/null @@ -1,178 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/job-interview-stages - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `JobInterviewStage` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: JobInterviewStagesListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - job_id: - type: optional - docs: If provided, will only return interview stages for this job. - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: atsRoot.PaginatedJobInterviewStageList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - job_id: job_id - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: f9813dd5-e70b-484c-91d8-00acd6065b07 - remote_id: '876556788' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Phone Screen - job: job - stage_order: 2 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /interview-stages - data: - - Varies by platform - retrieve: - path: /ats/v1/job-interview-stages/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `JobInterviewStage` object with the given `id`. - source: - openapi: ats_v3.yml - path-parameters: - id: string - request: - name: JobInterviewStagesRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: atsRoot.JobInterviewStage - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: f9813dd5-e70b-484c-91d8-00acd6065b07 - remote_id: '876556788' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Phone Screen - job: job - stage_order: 2 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /interview-stages - data: - - Varies by platform - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/jobPostings.yml b/.mock/definition/ATS/jobPostings.yml deleted file mode 100644 index 3863a2d7b..000000000 --- a/.mock/definition/ATS/jobPostings.yml +++ /dev/null @@ -1,220 +0,0 @@ -types: - JobPostingsListRequestStatus: - enum: - - CLOSED - - DRAFT - - INTERNAL - - PENDING - - PUBLISHED - source: - openapi: ats_v3.yml -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/job-postings - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `JobPosting` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: JobPostingsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - status: - type: optional - docs: >- - If provided, will only return Job Postings with this status. - Options: ('PUBLISHED', 'CLOSED', 'DRAFT', 'INTERNAL', 'PENDING') - - - * `PUBLISHED` - PUBLISHED - - * `CLOSED` - CLOSED - - * `DRAFT` - DRAFT - - * `INTERNAL` - INTERNAL - - * `PENDING` - PENDING - response: - docs: '' - type: atsRoot.PaginatedJobPostingList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - status: CLOSED - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 156a2bef-57e5-4def-8ed2-7c41bd9a554t - remote_id: '1341324' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - title: Platform - NYC - job_posting_urls: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - value: https://merge.dev/careers - url_type: JOB_POSTING - job: job - status: PUBLISHED - content: Apply at https://merge.dev/careers - remote_created_at: '2021-10-15T00:00:00Z' - remote_updated_at: '2021-10-16T00:00:00Z' - is_internal: true - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /positions - data: - - Varies by platform - retrieve: - path: /ats/v1/job-postings/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `JobPosting` object with the given `id`. - source: - openapi: ats_v3.yml - path-parameters: - id: string - request: - name: JobPostingsRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: atsRoot.JobPosting - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 156a2bef-57e5-4def-8ed2-7c41bd9a554t - remote_id: '1341324' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - title: Platform - NYC - job_posting_urls: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - value: https://merge.dev/careers - url_type: JOB_POSTING - remote_was_deleted: true - job: job - status: PUBLISHED - content: Apply at https://merge.dev/careers - remote_created_at: '2021-10-15T00:00:00Z' - remote_updated_at: '2021-10-16T00:00:00Z' - is_internal: true - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /positions - data: - - Varies by platform - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/jobs.yml b/.mock/definition/ATS/jobs.yml deleted file mode 100644 index 3c8d1a781..000000000 --- a/.mock/definition/ATS/jobs.yml +++ /dev/null @@ -1,392 +0,0 @@ -types: - JobsListRequestExpandItem: - enum: - - departments - - hiring_managers - - job_postings - - offices - - recruiters - source: - openapi: ats_v3.yml - JobsListRequestStatus: - enum: - - ARCHIVED - - CLOSED - - DRAFT - - OPEN - - PENDING - source: - openapi: ats_v3.yml - JobsRetrieveRequestExpandItem: - enum: - - departments - - hiring_managers - - job_postings - - offices - - recruiters - source: - openapi: ats_v3.yml - JobsScreeningQuestionsListRequestExpandItem: - enum: - - job - - options - source: - openapi: ats_v3.yml -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/jobs - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Job` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: JobsListRequest - query-parameters: - code: - type: optional - docs: If provided, will only return jobs with this code. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - offices: - type: optional - docs: >- - If provided, will only return jobs for this office; multiple - offices can be separated by commas. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - status: - type: optional - docs: >- - If provided, will only return jobs with this status. Options: - ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING') - - - * `OPEN` - OPEN - - * `CLOSED` - CLOSED - - * `DRAFT` - DRAFT - - * `ARCHIVED` - ARCHIVED - - * `PENDING` - PENDING - response: - docs: '' - type: atsRoot.PaginatedJobList - status-code: 200 - examples: - - query-parameters: - code: code - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - offices: offices - page_size: 1 - remote_fields: status - remote_id: remote_id - show_enum_origins: status - status: ARCHIVED - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 - remote_id: '8765432' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Software Engineer (Merge is actually hiring btw) - description: >- - If you're reading this documentation, you might be a good - fit for Merge! - code: C0025 - status: OPEN - type: POSTING - job_postings: - - 2r3c1341-a20f-4e51-b72c-f3830a16c97b - - 543ed912-33ec-444e-a215-8d71cc42fc12 - job_posting_urls: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - value: https://merge.dev/careers - url_type: JOB_POSTING - remote_created_at: '2021-10-15T00:00:00Z' - remote_updated_at: '2021-10-16T00:00:00Z' - confidential: true - departments: - - 5b3c1341-a20f-4e51-b72c-f3830a16c97b - - d6e687d6-0c36-48a1-8114-35324b5cb38f - offices: - - 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - hiring_managers: - - 787ed912-33ec-444e-a215-8d71cc42fc12 - recruiters: - - 787ed912-33ec-444e-a215-8d71cc42fc12 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /positions - data: - - Varies by platform - retrieve: - path: /ats/v1/jobs/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Job` object with the given `id`. - source: - openapi: ats_v3.yml - path-parameters: - id: string - request: - name: JobsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: atsRoot.Job - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: status - show_enum_origins: status - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 - remote_id: '8765432' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Software Engineer (Merge is actually hiring btw) - description: >- - If you're reading this documentation, you might be a good fit - for Merge! - code: C0025 - status: OPEN - type: POSTING - job_postings: - - 2r3c1341-a20f-4e51-b72c-f3830a16c97b - - 543ed912-33ec-444e-a215-8d71cc42fc12 - job_posting_urls: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - value: https://merge.dev/careers - url_type: JOB_POSTING - remote_was_deleted: true - remote_created_at: '2021-10-15T00:00:00Z' - remote_updated_at: '2021-10-16T00:00:00Z' - confidential: true - departments: - - 5b3c1341-a20f-4e51-b72c-f3830a16c97b - - d6e687d6-0c36-48a1-8114-35324b5cb38f - offices: - - 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - hiring_managers: - - 787ed912-33ec-444e-a215-8d71cc42fc12 - recruiters: - - 787ed912-33ec-444e-a215-8d71cc42fc12 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /positions - data: - - Varies by platform - screeningQuestionsList: - path: /ats/v1/jobs/{job_id}/screening-questions - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `ScreeningQuestion` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - path-parameters: - job_id: string - request: - name: JobsScreeningQuestionsListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: atsRoot.PaginatedScreeningQuestionList - status-code: 200 - examples: - - path-parameters: - job_id: job_id - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 0238cbc6-6040-430a-848e-aaiehfhdbadf4ae - remote_id: '23729392' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - job: job - description: >- - Are you currently authorized to work for any employer in the - country outlined for this role? - title: Work Authorisation - type: DATE - required: true - options: - - remote_id: '19281' - label: I am currently authorised - - remote_id: '38372' - label: I am currently not eligible - remote_was_deleted: true - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/linkToken.yml b/.mock/definition/ATS/linkToken.yml deleted file mode 100644 index df4d0a840..000000000 --- a/.mock/definition/ATS/linkToken.yml +++ /dev/null @@ -1,155 +0,0 @@ -imports: - atsRoot: __package__.yml -types: - EndUserDetailsRequestLanguage: - discriminated: false - docs: >- - The following subset of IETF language tags can be used to configure - localization. - - - * `en` - en - - * `de` - de - union: - - atsRoot.LanguageEnum - - string - source: - openapi: ats_v3.yml - inline: true -service: - auth: false - base-path: '' - endpoints: - create: - path: /ats/v1/link-token - method: POST - auth: - - tokenAuth: [] - docs: Creates a link token to be used when linking a new end user. - source: - openapi: ats_v3.yml - request: - name: EndUserDetailsRequest - body: - properties: - end_user_email_address: - type: string - docs: >- - Your end user's email address. This is purely for identification - purposes - setting this value will not cause any emails to be - sent. - validation: - minLength: 1 - maxLength: 100 - end_user_organization_name: - type: string - docs: Your end user's organization. - validation: - minLength: 1 - maxLength: 100 - end_user_origin_id: - type: string - docs: >- - This unique identifier typically represents the ID for your end - user in your product's database. This value must be distinct - from other Linked Accounts' unique identifiers. - validation: - minLength: 1 - maxLength: 100 - categories: - docs: The integration categories to show in Merge Link. - type: list - integration: - type: optional - docs: >- - The slug of a specific pre-selected integration for this linking - flow token. For examples of slugs, see - https://docs.merge.dev/guides/merge-link/single-integration/. - validation: - minLength: 1 - link_expiry_mins: - type: optional - docs: >- - An integer number of minutes between [30, 720 or 10080 if for a - Magic Link URL] for how long this token is valid. Defaults to - 30. - default: 30 - validation: - min: 30 - max: 10080 - should_create_magic_link_url: - type: optional - docs: >- - Whether to generate a Magic Link URL. Defaults to false. For - more information on Magic Link, see - https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - default: false - hide_admin_magic_link: - type: optional - docs: >- - Whether to generate a Magic Link URL on the Admin Needed screen - during the linking flow. Defaults to false. For more information - on Magic Link, see - https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - default: false - common_models: - type: optional> - docs: >- - An array of objects to specify the models and fields that will - be disabled for a given Linked Account. Each object uses - model_id, enabled_actions, and disabled_fields to specify the - model, method, and fields that are scoped for a given Linked - Account. - category_common_model_scopes: - type: >- - optional>>> - docs: >- - When creating a Link Token, you can set permissions for Common - Models that will apply to the account that is going to be - linked. Any model or field not specified in link token payload - will default to existing settings. - language: - type: optional - docs: >- - The following subset of IETF language tags can be used to - configure localization. - - - * `en` - en - - * `de` - de - are_syncs_disabled: - type: optional - docs: >- - The boolean that indicates whether initial, periodic, and force - syncs will be disabled. - default: false - integration_specific_config: - type: optional> - docs: >- - A JSON object containing integration-specific configuration - options. - content-type: application/json - response: - docs: '' - type: atsRoot.LinkToken - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - end_user_email_address: example@gmail.com - end_user_organization_name: Test Organization - end_user_origin_id: '12345' - categories: - - hris - - ats - response: - body: - link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 - integration_name: Lever - magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/linkedAccounts.yml b/.mock/definition/ATS/linkedAccounts.yml deleted file mode 100644 index fec205e74..000000000 --- a/.mock/definition/ATS/linkedAccounts.yml +++ /dev/null @@ -1,169 +0,0 @@ -types: - LinkedAccountsListRequestCategory: - enum: - - accounting - - ats - - crm - - filestorage - - hris - - mktg - - ticketing - source: - openapi: ats_v3.yml -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/linked-accounts - method: GET - auth: - - tokenAuth: [] - docs: List linked accounts for your organization. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: LinkedAccountsListRequest - query-parameters: - category: - type: optional - docs: >- - Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, - `mktg`, `ticketing` - - - * `hris` - hris - - * `ats` - ats - - * `accounting` - accounting - - * `ticketing` - ticketing - - * `crm` - crm - - * `mktg` - mktg - - * `filestorage` - filestorage - cursor: - type: optional - docs: The pagination cursor value. - end_user_email_address: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given email address. - end_user_organization_name: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given organization name. - end_user_origin_id: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given origin ID. - end_user_origin_ids: - type: optional - docs: >- - Comma-separated list of EndUser origin IDs, making it possible to - specify multiple EndUsers at once. - id: - type: optional - validation: - format: uuid - ids: - type: optional - docs: >- - Comma-separated list of LinkedAccount IDs, making it possible to - specify multiple LinkedAccounts at once. - include_duplicates: - type: optional - docs: >- - If `true`, will include complete production duplicates of the - account specified by the `id` query parameter in the response. - `id` must be for a complete production linked account. - integration_name: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given integration name. - is_test_account: - type: optional - docs: >- - If included, will only include test linked accounts. If not - included, will only include non-test linked accounts. - page_size: - type: optional - docs: Number of results to return per page. - status: - type: optional - docs: >- - Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, - `RELINK_NEEDED` - response: - docs: '' - type: atsRoot.PaginatedAccountDetailsAndActionsList - status-code: 200 - examples: - - query-parameters: - category: accounting - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_user_email_address: end_user_email_address - end_user_organization_name: end_user_organization_name - end_user_origin_id: end_user_origin_id - end_user_origin_ids: end_user_origin_ids - id: id - ids: ids - include_duplicates: true - integration_name: integration_name - is_test_account: is_test_account - page_size: 1 - status: status - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: e59b1821-f85c-4e28-a6b3-1804156f3563 - category: hris - status: COMPLETE - status_detail: Invalid login credentials - end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d - end_user_organization_name: Foo Bar, LLC - end_user_email_address: hradmin@foobar.dev - subdomain: foobar - webhook_listener_url: >- - https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: true - integration: - name: name - categories: - - hris - color: color - slug: slug - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - account_type: PRODUCTION - completed_at: '2024-08-26T20:11:19Z' - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/offers.yml b/.mock/definition/ATS/offers.yml deleted file mode 100644 index 37733768f..000000000 --- a/.mock/definition/ATS/offers.yml +++ /dev/null @@ -1,227 +0,0 @@ -types: - OffersListRequestExpandItem: - enum: - - application - - creator - source: - openapi: ats_v3.yml - OffersRetrieveRequestExpandItem: - enum: - - application - - creator - source: - openapi: ats_v3.yml -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/offers - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Offer` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: OffersListRequest - query-parameters: - application_id: - type: optional - docs: If provided, will only return offers for this application. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - creator_id: - type: optional - docs: If provided, will only return offers created by this user. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: atsRoot.PaginatedOfferList - status-code: 200 - examples: - - query-parameters: - application_id: application_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - creator_id: creator_id - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_fields: status - remote_id: remote_id - show_enum_origins: status - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: dd85625c-6a59-446f-a317-6de64d83bae7 - remote_id: '9876' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - application: application - creator: creator - remote_created_at: '2021-10-15T00:00:00Z' - closed_at: '2021-10-16T00:00:00Z' - sent_at: '2021-10-15T00:00:00Z' - start_date: '2021-11-15T00:00:00Z' - status: DRAFT - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /offers - data: - - Varies by platform - retrieve: - path: /ats/v1/offers/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Offer` object with the given `id`. - source: - openapi: ats_v3.yml - path-parameters: - id: string - request: - name: OffersRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: atsRoot.Offer - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: status - show_enum_origins: status - headers: - X-Account-Token: X-Account-Token - response: - body: - id: dd85625c-6a59-446f-a317-6de64d83bae7 - remote_id: '9876' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - application: application - creator: creator - remote_created_at: '2021-10-15T00:00:00Z' - closed_at: '2021-10-16T00:00:00Z' - sent_at: '2021-10-15T00:00:00Z' - start_date: '2021-11-15T00:00:00Z' - status: DRAFT - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /offers - data: - - Varies by platform - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/offices.yml b/.mock/definition/ATS/offices.yml deleted file mode 100644 index 9d144f262..000000000 --- a/.mock/definition/ATS/offices.yml +++ /dev/null @@ -1,160 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/offices - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Office` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: OfficesListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: atsRoot.PaginatedOfficeList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - remote_id: '876556788' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: SF Office - location: Embarcadero Center 2 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /locations - data: - - Varies by platform - retrieve: - path: /ats/v1/offices/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Office` object with the given `id`. - source: - openapi: ats_v3.yml - path-parameters: - id: string - request: - name: OfficesRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: atsRoot.Office - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - remote_id: '876556788' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: SF Office - location: Embarcadero Center 2 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /locations - data: - - Varies by platform - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/passthrough.yml b/.mock/definition/ATS/passthrough.yml deleted file mode 100644 index 52615aad9..000000000 --- a/.mock/definition/ATS/passthrough.yml +++ /dev/null @@ -1,42 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /ats/v1/passthrough - method: POST - auth: - - tokenAuth: [] - docs: Pull data from an endpoint not currently supported by Merge. - source: - openapi: ats_v3.yml - request: - body: atsRoot.DataPassthroughRequest - content-type: application/json - response: - docs: '' - type: atsRoot.RemoteResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - method: GET - path: /scooters - response: - body: - method: GET - path: /scooters - status: 200 - response: - key: value - response_headers: - X-Page-Token: value - response_type: JSON - headers: - EXTRA-HEADER: value - Authorization: - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/regenerateKey.yml b/.mock/definition/ATS/regenerateKey.yml deleted file mode 100644 index 08d64644e..000000000 --- a/.mock/definition/ATS/regenerateKey.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /ats/v1/regenerate-key - method: POST - auth: - - tokenAuth: [] - docs: Exchange remote keys. - source: - openapi: ats_v3.yml - request: - name: RemoteKeyForRegenerationRequest - body: - properties: - name: - type: string - docs: The name of the remote key - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: atsRoot.RemoteKey - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - name: Remote Deployment Key 1 - response: - body: - name: Remote Deployment Key 1 - key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/rejectReasons.yml b/.mock/definition/ATS/rejectReasons.yml deleted file mode 100644 index 563303a42..000000000 --- a/.mock/definition/ATS/rejectReasons.yml +++ /dev/null @@ -1,158 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/reject-reasons - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RejectReason` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: RejectReasonsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: atsRoot.PaginatedRejectReasonList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 8be99a4a-f8d4-4339-bf1e-30eac970e217 - remote_id: '876556788' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Not passionate enough about APIs. - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /rejection-reasons - data: - - Varies by platform - retrieve: - path: /ats/v1/reject-reasons/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `RejectReason` object with the given `id`. - source: - openapi: ats_v3.yml - path-parameters: - id: string - request: - name: RejectReasonsRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: atsRoot.RejectReason - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 8be99a4a-f8d4-4339-bf1e-30eac970e217 - remote_id: '876556788' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Not passionate enough about APIs. - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /rejection-reasons - data: - - Varies by platform - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/scopes.yml b/.mock/definition/ATS/scopes.yml deleted file mode 100644 index 9fc4d12f8..000000000 --- a/.mock/definition/ATS/scopes.yml +++ /dev/null @@ -1,167 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - default_scopes_retrieve: - path: /ats/v1/default-scopes - method: GET - auth: - - tokenAuth: [] - docs: >- - Get the default permissions for Merge Common Models and fields across - all Linked Accounts of a given category. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - source: - openapi: ats_v3.yml - response: - docs: '' - type: atsRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - linked_account_scopes_retrieve: - path: /ats/v1/linked-account-scopes - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all available permissions for Merge Common Models and fields for a - single Linked Account. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - source: - openapi: ats_v3.yml - response: - docs: '' - type: atsRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - linked_account_scopes_create: - path: /ats/v1/linked-account-scopes - method: POST - auth: - - tokenAuth: [] - docs: >- - Update permissions for any Common Model or field for a single Linked - Account. Any Scopes not set in this POST request will inherit the - default Scopes. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) - source: - openapi: ats_v3.yml - request: - name: LinkedAccountCommonModelScopeDeserializerRequest - body: - properties: - common_models: - docs: The common models you want to update the scopes for - type: list - content-type: application/json - response: - docs: '' - type: atsRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - home_location - disabled_fields: - - work_location - - model_name: Benefit - model_permissions: - WRITE: - is_enabled: false - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/scorecards.yml b/.mock/definition/ATS/scorecards.yml deleted file mode 100644 index 5856ace67..000000000 --- a/.mock/definition/ATS/scorecards.yml +++ /dev/null @@ -1,231 +0,0 @@ -types: - ScorecardsListRequestExpandItem: - enum: - - application - - interview - - interviewer - source: - openapi: ats_v3.yml - ScorecardsRetrieveRequestExpandItem: - enum: - - application - - interview - - interviewer - source: - openapi: ats_v3.yml -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/scorecards - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Scorecard` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: ScorecardsListRequest - query-parameters: - application_id: - type: optional - docs: If provided, will only return scorecards for this application. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - interview_id: - type: optional - docs: If provided, will only return scorecards for this interview. - interviewer_id: - type: optional - docs: If provided, will only return scorecards for this interviewer. - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: atsRoot.PaginatedScorecardList - status-code: 200 - examples: - - query-parameters: - application_id: application_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - interview_id: interview_id - interviewer_id: interviewer_id - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_fields: overall_recommendation - remote_id: remote_id - show_enum_origins: overall_recommendation - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 3eab2f17-eeb1-450d-97f0-029d8be1e06f - remote_id: '22234' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - application: application - interview: interview - interviewer: interviewer - remote_created_at: '2021-10-15T00:00:00Z' - submitted_at: '2021-10-15T00:00:00Z' - overall_recommendation: DEFINITELY_NO - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /ratings - data: - - Varies by platform - retrieve: - path: /ats/v1/scorecards/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Scorecard` object with the given `id`. - source: - openapi: ats_v3.yml - path-parameters: - id: string - request: - name: ScorecardsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: atsRoot.Scorecard - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: overall_recommendation - show_enum_origins: overall_recommendation - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 3eab2f17-eeb1-450d-97f0-029d8be1e06f - remote_id: '22234' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - application: application - interview: interview - interviewer: interviewer - remote_created_at: '2021-10-15T00:00:00Z' - submitted_at: '2021-10-15T00:00:00Z' - overall_recommendation: DEFINITELY_NO - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /ratings - data: - - Varies by platform - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/syncStatus.yml b/.mock/definition/ATS/syncStatus.yml deleted file mode 100644 index 6430f8d03..000000000 --- a/.mock/definition/ATS/syncStatus.yml +++ /dev/null @@ -1,64 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/sync-status - method: GET - auth: - - tokenAuth: [] - docs: >- - Get sync status for the current sync and the most recently finished - sync. `last_sync_start` represents the most recent time any sync began. - `last_sync_finished` represents the most recent time any sync completed. - These timestamps may correspond to different sync instances which may - result in a sync start time being later than a separate sync completed - time. To ensure you are retrieving the latest available data reference - the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. - Possible values for `status` and `last_sync_result` are `DISABLED`, - `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more - about sync status in our [Help - Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: SyncStatusListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: atsRoot.PaginatedSyncStatusList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - model_name: Candidate - model_id: ats.Candidate - last_sync_start: '2021-03-30T19:44:18Z' - next_sync_start: '2021-03-30T20:44:18Z' - last_sync_result: SYNCING - last_sync_finished: '2021-03-30T19:55:18Z' - status: SYNCING - is_initial_sync: true - selective_sync_configurations_usage: IN_NEXT_SYNC - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/tags.yml b/.mock/definition/ATS/tags.yml deleted file mode 100644 index 33e751f61..000000000 --- a/.mock/definition/ATS/tags.yml +++ /dev/null @@ -1,105 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/tags - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Tag` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: TagsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: atsRoot.PaginatedTagList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - remote_id: '4567' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: High-Priority - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /tags - data: - - Varies by platform - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/users.yml b/.mock/definition/ATS/users.yml deleted file mode 100644 index 13abe7c91..000000000 --- a/.mock/definition/ATS/users.yml +++ /dev/null @@ -1,200 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/users - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteUser` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ats_v3.yml - request: - name: UsersListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - email: - type: optional - docs: >- - If provided, will only return remote users with the given email - address - validation: - format: email - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: atsRoot.PaginatedRemoteUserList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - email: email - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_fields: access_role - remote_id: remote_id - show_enum_origins: access_role - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: b82302de-852e-4e60-b050-edf9da3b7c02 - remote_id: '344321' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - first_name: Shensi - last_name: Ding - email: hello@merge.dev - disabled: true - remote_created_at: '2020-11-10T00:00:00Z' - access_role: SUPER_ADMIN - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /users - data: - - Varies by platform - retrieve: - path: /ats/v1/users/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `RemoteUser` object with the given `id`. - source: - openapi: ats_v3.yml - path-parameters: - id: string - request: - name: UsersRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: atsRoot.RemoteUser - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: access_role - show_enum_origins: access_role - headers: - X-Account-Token: X-Account-Token - response: - body: - id: b82302de-852e-4e60-b050-edf9da3b7c02 - remote_id: '344321' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - first_name: Shensi - last_name: Ding - email: hello@merge.dev - disabled: true - remote_created_at: '2020-11-10T00:00:00Z' - access_role: SUPER_ADMIN - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /users - data: - - Varies by platform - source: - openapi: ats_v3.yml diff --git a/.mock/definition/ATS/webhookReceivers.yml b/.mock/definition/ATS/webhookReceivers.yml deleted file mode 100644 index b65ab6cc9..000000000 --- a/.mock/definition/ATS/webhookReceivers.yml +++ /dev/null @@ -1,65 +0,0 @@ -imports: - atsRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ats/v1/webhook-receivers - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `WebhookReceiver` objects. - source: - openapi: ats_v3.yml - response: - docs: '' - type: list - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - - event: event - is_active: true - key: key - create: - path: /ats/v1/webhook-receivers - method: POST - auth: - - tokenAuth: [] - docs: Creates a `WebhookReceiver` object with the given values. - source: - openapi: ats_v3.yml - request: - name: WebhookReceiverRequest - body: - properties: - event: - type: string - validation: - minLength: 1 - is_active: boolean - key: - type: optional - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: atsRoot.WebhookReceiver - status-code: 201 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - event: event - is_active: true - response: - body: - event: event - is_active: true - key: key - source: - openapi: ats_v3.yml diff --git a/.mock/definition/Accounting/__package__.yml b/.mock/definition/Accounting/__package__.yml deleted file mode 100644 index 231b8311f..000000000 --- a/.mock/definition/Accounting/__package__.yml +++ /dev/null @@ -1,52736 +0,0 @@ -types: - AccountClassification: - discriminated: false - docs: |- - The account's broadest grouping. - - * `ASSET` - ASSET - * `EQUITY` - EQUITY - * `EXPENSE` - EXPENSE - * `LIABILITY` - LIABILITY - * `REVENUE` - REVENUE - union: - - ClassificationEnum - - string - source: - openapi: accounting_v3.yml - inline: true - AccountAccountType: - discriminated: false - docs: >- - Normalized account type- which is a narrower and more specific grouping - within the account's classification. - - - * `BANK` - BANK - - * `CREDIT_CARD` - CREDIT_CARD - - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - - * `FIXED_ASSET` - FIXED_ASSET - - * `OTHER_ASSET` - OTHER_ASSET - - * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET - - * `OTHER_EXPENSE` - OTHER_EXPENSE - - * `OTHER_INCOME` - OTHER_INCOME - - * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD - - * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY - - * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY - - * `NON_POSTING` - NON_POSTING - union: - - AccountAccountTypeEnum - - string - source: - openapi: accounting_v3.yml - inline: true - AccountStatus: - discriminated: false - docs: |- - The account's status. - - * `ACTIVE` - ACTIVE - * `PENDING` - PENDING - * `INACTIVE` - INACTIVE - union: - - AccountStatusEnum - - string - source: - openapi: accounting_v3.yml - inline: true - AccountCurrency: - discriminated: false - docs: >- - The account's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - Account: - docs: >- - # The Account Object - - ### Description - - An `Account` represents a category in a company’s ledger in which a - financial transaction is recorded against. The aggregation of each - `Account` object is often referred to as the **Chart of Accounts**. - - - An `Account` can be classified into one of the following categories, - determined through the `classification` field: - - * __Asset:__ Accounts Receivable and Bank Accounts - - * __Liability:__ Accounts Payable and Credit Card Accounts - - * __Equity:__ Treasury Accounts and Retained Earnings - - * __Revenue:__ Income and Other Income - - * __Expense:__ Cost of Goods Sold and Office Expenses - - - ### Usage Example - - Fetch from the `LIST Accounts` endpoint and view a company's accounts. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The account's name. - description: - type: optional - docs: The account's description. - classification: - type: optional - docs: |- - The account's broadest grouping. - - * `ASSET` - ASSET - * `EQUITY` - EQUITY - * `EXPENSE` - EXPENSE - * `LIABILITY` - LIABILITY - * `REVENUE` - REVENUE - type: - type: optional - docs: >- - The account's type is a narrower and more specific grouping within the - account's classification. - account_type: - type: optional - docs: >- - Normalized account type- which is a narrower and more specific - grouping within the account's classification. - - - * `BANK` - BANK - - * `CREDIT_CARD` - CREDIT_CARD - - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - - * `FIXED_ASSET` - FIXED_ASSET - - * `OTHER_ASSET` - OTHER_ASSET - - * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET - - * `OTHER_EXPENSE` - OTHER_EXPENSE - - * `OTHER_INCOME` - OTHER_INCOME - - * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD - - * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY - - * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY - - * `NON_POSTING` - NON_POSTING - status: - type: optional - docs: |- - The account's status. - - * `ACTIVE` - ACTIVE - * `PENDING` - PENDING - * `INACTIVE` - INACTIVE - current_balance: - type: optional - docs: The account's current balance. - currency: - type: optional - docs: >- - The account's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - account_number: - type: optional - docs: The account's number. - parent_account: - type: optional - docs: ID of the parent account. - validation: - format: uuid - company: - type: optional - docs: The company the account belongs to. - validation: - format: uuid - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - AccountAccountTypeEnum: - enum: - - BANK - - CREDIT_CARD - - ACCOUNTS_PAYABLE - - ACCOUNTS_RECEIVABLE - - FIXED_ASSET - - OTHER_ASSET - - OTHER_CURRENT_ASSET - - OTHER_EXPENSE - - OTHER_INCOME - - COST_OF_GOODS_SOLD - - OTHER_CURRENT_LIABILITY - - LONG_TERM_LIABILITY - - NON_POSTING - docs: |- - * `BANK` - BANK - * `CREDIT_CARD` - CREDIT_CARD - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - * `FIXED_ASSET` - FIXED_ASSET - * `OTHER_ASSET` - OTHER_ASSET - * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET - * `OTHER_EXPENSE` - OTHER_EXPENSE - * `OTHER_INCOME` - OTHER_INCOME - * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD - * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY - * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY - * `NON_POSTING` - NON_POSTING - source: - openapi: accounting_v3.yml - AccountDetails: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - integration: - type: optional - access: read-only - integration_slug: - type: optional - access: read-only - category: optional - end_user_origin_id: - type: optional - access: read-only - end_user_organization_name: - type: optional - access: read-only - end_user_email_address: - type: optional - validation: - format: email - access: read-only - status: - type: optional - access: read-only - webhook_listener_url: - type: optional - validation: - format: uri - access: read-only - is_duplicate: - type: optional - docs: >- - Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test - Linked Accounts, incomplete Production Linked Accounts, and ignored - duplicate Production Linked Account sets. - access: read-only - account_type: - type: optional - access: read-only - completed_at: - type: optional - docs: The time at which account completes the linking flow. - source: - openapi: accounting_v3.yml - AccountDetailsAndActionsCategory: - discriminated: false - union: - - CategoryEnum - - string - source: - openapi: accounting_v3.yml - inline: true - AccountDetailsAndActionsStatus: - discriminated: false - union: - - AccountDetailsAndActionsStatusEnum - - string - source: - openapi: accounting_v3.yml - inline: true - AccountDetailsAndActions: - docs: >- - # The LinkedAccount Object - - ### Description - - The `LinkedAccount` object is used to represent an end user's link with a - specific integration. - - - ### Usage Example - - View a list of your organization's `LinkedAccount` objects. - properties: - id: string - category: optional - status: AccountDetailsAndActionsStatus - status_detail: optional - end_user_origin_id: optional - end_user_organization_name: string - end_user_email_address: string - subdomain: - type: optional - docs: The tenant or domain the customer has provided access to. - webhook_listener_url: string - is_duplicate: - type: optional - docs: >- - Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test - Linked Accounts, incomplete Production Linked Accounts, and ignored - duplicate Production Linked Account sets. - integration: optional - account_type: string - completed_at: datetime - source: - openapi: accounting_v3.yml - AccountDetailsAndActionsIntegration: - properties: - name: string - categories: list - image: optional - square_image: optional - color: string - slug: string - passthrough_available: boolean - available_model_operations: optional> - source: - openapi: accounting_v3.yml - AccountDetailsAndActionsStatusEnum: - enum: - - COMPLETE - - INCOMPLETE - - RELINK_NEEDED - - IDLE - docs: |- - * `COMPLETE` - COMPLETE - * `INCOMPLETE` - INCOMPLETE - * `RELINK_NEEDED` - RELINK_NEEDED - * `IDLE` - IDLE - source: - openapi: accounting_v3.yml - AccountIntegration: - properties: - name: - type: string - docs: Company name. - abbreviated_name: - type: optional - docs: >- - Optional. This shortened name appears in places with limited space, - usually in conjunction with the platform's logo (e.g., Merge Link - menu).

Example: Workforce Now (in lieu of ADP Workforce - Now), SuccessFactors (in lieu of SAP SuccessFactors) - categories: - type: optional> - docs: >- - Category or categories this integration belongs to. Multiple - categories should be comma separated, i.e. [ats, hris]. - access: read-only - image: - type: optional - docs: Company logo in rectangular shape. - validation: - format: uri - square_image: - type: optional - docs: Company logo in square shape. - validation: - format: uri - color: - type: optional - docs: >- - The color of this integration used for buttons and text throughout the - app and landing pages. Choose a darker, saturated color. - validation: - pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ - maxLength: 18 - slug: - type: optional - access: read-only - api_endpoints_to_documentation_urls: - type: optional> - docs: >- - Mapping of API endpoints to documentation urls for support. Example: - {'GET': [['/common-model-scopes', - 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', - 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], - 'POST': []} - webhook_setup_guide_url: - type: optional - docs: >- - Setup guide URL for third party webhook creation. Exposed in Merge - Docs. - category_beta_status: - type: optional> - docs: Category or categories this integration is in beta status for. - access: read-only - source: - openapi: accounting_v3.yml - AccountRequestClassification: - discriminated: false - docs: |- - The account's broadest grouping. - - * `ASSET` - ASSET - * `EQUITY` - EQUITY - * `EXPENSE` - EXPENSE - * `LIABILITY` - LIABILITY - * `REVENUE` - REVENUE - union: - - ClassificationEnum - - string - source: - openapi: accounting_v3.yml - inline: true - AccountRequestAccountType: - discriminated: false - docs: >- - Normalized account type- which is a narrower and more specific grouping - within the account's classification. - - - * `BANK` - BANK - - * `CREDIT_CARD` - CREDIT_CARD - - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - - * `FIXED_ASSET` - FIXED_ASSET - - * `OTHER_ASSET` - OTHER_ASSET - - * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET - - * `OTHER_EXPENSE` - OTHER_EXPENSE - - * `OTHER_INCOME` - OTHER_INCOME - - * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD - - * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY - - * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY - - * `NON_POSTING` - NON_POSTING - union: - - AccountAccountTypeEnum - - string - source: - openapi: accounting_v3.yml - inline: true - AccountRequestStatus: - discriminated: false - docs: |- - The account's status. - - * `ACTIVE` - ACTIVE - * `PENDING` - PENDING - * `INACTIVE` - INACTIVE - union: - - AccountStatusEnum - - string - source: - openapi: accounting_v3.yml - inline: true - AccountRequestCurrency: - discriminated: false - docs: >- - The account's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - AccountRequest: - docs: >- - # The Account Object - - ### Description - - An `Account` represents a category in a company’s ledger in which a - financial transaction is recorded against. The aggregation of each - `Account` object is often referred to as the **Chart of Accounts**. - - - An `Account` can be classified into one of the following categories, - determined through the `classification` field: - - * __Asset:__ Accounts Receivable and Bank Accounts - - * __Liability:__ Accounts Payable and Credit Card Accounts - - * __Equity:__ Treasury Accounts and Retained Earnings - - * __Revenue:__ Income and Other Income - - * __Expense:__ Cost of Goods Sold and Office Expenses - - - ### Usage Example - - Fetch from the `LIST Accounts` endpoint and view a company's accounts. - properties: - name: - type: optional - docs: The account's name. - description: - type: optional - docs: The account's description. - classification: - type: optional - docs: |- - The account's broadest grouping. - - * `ASSET` - ASSET - * `EQUITY` - EQUITY - * `EXPENSE` - EXPENSE - * `LIABILITY` - LIABILITY - * `REVENUE` - REVENUE - type: - type: optional - docs: >- - The account's type is a narrower and more specific grouping within the - account's classification. - account_type: - type: optional - docs: >- - Normalized account type- which is a narrower and more specific - grouping within the account's classification. - - - * `BANK` - BANK - - * `CREDIT_CARD` - CREDIT_CARD - - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - - * `FIXED_ASSET` - FIXED_ASSET - - * `OTHER_ASSET` - OTHER_ASSET - - * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET - - * `OTHER_EXPENSE` - OTHER_EXPENSE - - * `OTHER_INCOME` - OTHER_INCOME - - * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD - - * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY - - * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY - - * `NON_POSTING` - NON_POSTING - status: - type: optional - docs: |- - The account's status. - - * `ACTIVE` - ACTIVE - * `PENDING` - PENDING - * `INACTIVE` - INACTIVE - current_balance: - type: optional - docs: The account's current balance. - currency: - type: optional - docs: >- - The account's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - account_number: - type: optional - docs: The account's number. - parent_account: - type: optional - docs: ID of the parent account. - validation: - format: uuid - company: - type: optional - docs: The company the account belongs to. - validation: - format: uuid - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - AccountResponse: - properties: - model: Account - warnings: list - errors: list - logs: optional> - source: - openapi: accounting_v3.yml - AccountStatusEnum: - enum: - - ACTIVE - - PENDING - - INACTIVE - docs: |- - * `ACTIVE` - ACTIVE - * `PENDING` - PENDING - * `INACTIVE` - INACTIVE - source: - openapi: accounting_v3.yml - AccountToken: - properties: - account_token: string - integration: AccountIntegration - id: string - source: - openapi: accounting_v3.yml - AccountingAttachment: - docs: >- - # The Accounting Attachment Object - - ### Description - - The `AccountingAttachment` object is used to represent a company's - attachments. - - - ### Usage Example - - Fetch from the `LIST AccountingAttachments` endpoint and view a company's - attachments. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - file_name: - type: optional - docs: The attachment's name. - file_url: - type: optional - docs: The attachment's url. - validation: - format: uri - maxLength: 2000 - company: - type: optional - docs: The company the accounting attachment belongs to. - validation: - format: uuid - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - AccountingAttachmentRequest: - docs: >- - # The Accounting Attachment Object - - ### Description - - The `AccountingAttachment` object is used to represent a company's - attachments. - - - ### Usage Example - - Fetch from the `LIST AccountingAttachments` endpoint and view a company's - attachments. - properties: - file_name: - type: optional - docs: The attachment's name. - file_url: - type: optional - docs: The attachment's url. - validation: - format: uri - maxLength: 2000 - company: - type: optional - docs: The company the accounting attachment belongs to. - validation: - format: uuid - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - AccountingAttachmentResponse: - properties: - model: AccountingAttachment - warnings: list - errors: list - logs: optional> - source: - openapi: accounting_v3.yml - AccountingPeriodStatus: - discriminated: false - union: - - Status895Enum - - string - source: - openapi: accounting_v3.yml - inline: true - AccountingPeriod: - docs: >- - # The AccountingPeriod Object - - ### Description - - The `AccountingPeriod` object is used to define a period of time in which - events occurred. - - - ### Usage Example - - Common models like `Invoice` and `Transaction` will have - `AccountingPeriod` objects which will denote when they occurred. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: Name of the accounting period. - validation: - maxLength: 100 - status: optional - start_date: - type: optional - docs: Beginning date of the period - end_date: - type: optional - docs: End date of the period - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - AccountingPhoneNumber: - docs: >- - # The AccountingPhoneNumber Object - - ### Description - - The `AccountingPhoneNumber` object is used to represent a contact's or - company's phone number. - - - ### Usage Example - - Fetch from the `GET CompanyInfo` endpoint and view the company's phone - numbers. - properties: - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - number: - type: optional - docs: The phone number. - type: - type: optional - docs: The phone number's type. - source: - openapi: accounting_v3.yml - AccountingPhoneNumberRequest: - docs: >- - # The AccountingPhoneNumber Object - - ### Description - - The `AccountingPhoneNumber` object is used to represent a contact's or - company's phone number. - - - ### Usage Example - - Fetch from the `GET CompanyInfo` endpoint and view the company's phone - numbers. - properties: - number: - type: optional - docs: The phone number. - type: - type: optional - docs: The phone number's type. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - AddressType: - discriminated: false - docs: |- - The address type. - - * `BILLING` - BILLING - * `SHIPPING` - SHIPPING - union: - - AddressTypeEnum - - string - source: - openapi: accounting_v3.yml - inline: true - AddressCountry: - discriminated: false - docs: |- - The address's country. - - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - union: - - CountryEnum - - string - source: - openapi: accounting_v3.yml - inline: true - Address: - docs: >- - # The Address Object - - ### Description - - The `Address` object is used to represent a contact's or company's - address. - - - ### Usage Example - - Fetch from the `GET CompanyInfo` endpoint and view the company's - addresses. - properties: - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - type: - type: optional - docs: |- - The address type. - - * `BILLING` - BILLING - * `SHIPPING` - SHIPPING - street_1: - type: optional - docs: Line 1 of the address's street. - street_2: - type: optional - docs: Line 2 of the address's street. - city: - type: optional - docs: The address's city. - state: - type: optional - access: read-only - country_subdivision: - type: optional - docs: The address's state or region. - country: - type: optional - docs: |- - The address's country. - - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - zip_code: - type: optional - docs: The address's zip code. - source: - openapi: accounting_v3.yml - AddressRequestType: - discriminated: false - docs: |- - The address type. - - * `BILLING` - BILLING - * `SHIPPING` - SHIPPING - union: - - AddressTypeEnum - - string - source: - openapi: accounting_v3.yml - inline: true - AddressRequestCountry: - discriminated: false - docs: |- - The address's country. - - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - union: - - CountryEnum - - string - source: - openapi: accounting_v3.yml - inline: true - AddressRequest: - docs: >- - # The Address Object - - ### Description - - The `Address` object is used to represent a contact's or company's - address. - - - ### Usage Example - - Fetch from the `GET CompanyInfo` endpoint and view the company's - addresses. - properties: - type: - type: optional - docs: |- - The address type. - - * `BILLING` - BILLING - * `SHIPPING` - SHIPPING - street_1: - type: optional - docs: Line 1 of the address's street. - street_2: - type: optional - docs: Line 2 of the address's street. - city: - type: optional - docs: The address's city. - country_subdivision: - type: optional - docs: The address's state or region. - country: - type: optional - docs: |- - The address's country. - - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - zip_code: - type: optional - docs: The address's zip code. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - AddressTypeEnum: - enum: - - BILLING - - SHIPPING - docs: |- - * `BILLING` - BILLING - * `SHIPPING` - SHIPPING - source: - openapi: accounting_v3.yml - AdvancedMetadata: - properties: - id: - type: string - validation: - format: uuid - display_name: optional - description: optional - is_required: optional - is_custom: optional - field_choices: optional> - source: - openapi: accounting_v3.yml - AsyncPassthroughReciept: - properties: - async_passthrough_receipt_id: - type: string - validation: - format: uuid - source: - openapi: accounting_v3.yml - AsyncPostTaskStatus: - discriminated: false - union: - - AsyncPostTaskStatusEnum - - string - source: - openapi: accounting_v3.yml - inline: true - AsyncPostTask: - properties: - status: AsyncPostTaskStatus - result: AsyncPostTaskResult - source: - openapi: accounting_v3.yml - AsyncPostTaskResult: - properties: - status_code: optional - response: optional> - source: - openapi: accounting_v3.yml - AsyncPostTaskStatusEnum: - enum: - - QUEUED - - IN_PROGRESS - - COMPLETED - - FAILURE - docs: |- - * `QUEUED` - QUEUED - * `IN_PROGRESS` - IN_PROGRESS - * `COMPLETED` - COMPLETED - * `FAILURE` - FAILURE - source: - openapi: accounting_v3.yml - AuditLogEventRole: - discriminated: false - docs: >- - Designates the role of the user (or SYSTEM/API if action not taken by a - user) at the time of this Event occurring. - - - * `ADMIN` - ADMIN - - * `DEVELOPER` - DEVELOPER - - * `MEMBER` - MEMBER - - * `API` - API - - * `SYSTEM` - SYSTEM - - * `MERGE_TEAM` - MERGE_TEAM - union: - - RoleEnum - - string - source: - openapi: accounting_v3.yml - inline: true - AuditLogEventEventType: - discriminated: false - docs: >- - Designates the type of event that occurred. - - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - union: - - EventTypeEnum - - string - source: - openapi: accounting_v3.yml - inline: true - AuditLogEvent: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - user_name: - type: optional - docs: The User's full name at the time of this Event occurring. - validation: - maxLength: 200 - user_email: - type: optional - docs: The User's email at the time of this Event occurring. - validation: - format: email - maxLength: 254 - role: - type: AuditLogEventRole - docs: >- - Designates the role of the user (or SYSTEM/API if action not taken by - a user) at the time of this Event occurring. - - - * `ADMIN` - ADMIN - - * `DEVELOPER` - DEVELOPER - - * `MEMBER` - MEMBER - - * `API` - API - - * `SYSTEM` - SYSTEM - - * `MERGE_TEAM` - MERGE_TEAM - ip_address: - type: string - validation: - maxLength: 45 - event_type: - type: AuditLogEventEventType - docs: >- - Designates the type of event that occurred. - - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - event_description: string - created_at: - type: optional - access: read-only - source: - openapi: accounting_v3.yml - AvailableActions: - docs: >- - # The AvailableActions Object - - ### Description - - The `Activity` object is used to see all available model/operation - combinations for an integration. - - - ### Usage Example - - Fetch all the actions available for the `Zenefits` integration. - properties: - integration: AccountIntegration - passthrough_available: boolean - available_model_operations: optional> - source: - openapi: accounting_v3.yml - BalanceSheetCurrency: - discriminated: false - docs: >- - The balance sheet's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - BalanceSheetCompany: - discriminated: false - docs: '`Company` object for the given `BalanceSheet` object.' - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - BalanceSheet: - docs: >- - # The BalanceSheet Object - - ### Description - - The `BalanceSheet` object shows a company’s assets, liabilities, and - equity. Assets should be equal to liability and equity combined. This - shows the company’s financial health at a specific point in time. - - - ### Usage Example - - Fetch from the `LIST BalanceSheets` endpoint and view a company's balance - sheets. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The balance sheet's name. - currency: - type: optional - docs: >- - The balance sheet's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - company: - type: optional - docs: '`Company` object for the given `BalanceSheet` object.' - date: - type: optional - docs: >- - The balance sheet's date. The balance sheet data will reflect the - company's financial position this point in time. - net_assets: - type: optional - docs: The balance sheet's net assets. - assets: - type: optional> - access: read-only - liabilities: - type: optional> - access: read-only - equity: - type: optional> - access: read-only - remote_generated_at: - type: optional - docs: The time that balance sheet was generated by the accounting system. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - BankFeedAccountCurrency: - discriminated: false - docs: >- - The currency code of the bank feed. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - BankFeedAccountFeedStatus: - discriminated: false - docs: |- - The status of the bank feed. - - * `ACTIVE` - ACTIVE - * `INACTIVE` - INACTIVE - union: - - FeedStatusEnum - - string - source: - openapi: accounting_v3.yml - inline: true - BankFeedAccountAccountType: - discriminated: false - docs: |- - The type of the account. - - * `BANK` - BANK - * `CREDIT_CARD` - CREDIT_CARD - union: - - BankFeedAccountAccountTypeEnum - - string - source: - openapi: accounting_v3.yml - inline: true - BankFeedAccount: - docs: >- - # The BankFeedAccount Object - - ### Description - - The `BankFeedAccount` object represents a bank feed account, detailing - various attributes including account identifiers, names, currency, and - balance information. This object is central to managing and tracking bank - feed accounts within the system. - - - ### Usage Example - - Fetch from the `GET BankFeedAccount` endpoint to view details of a bank - feed account. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - source_account_id: - type: optional - docs: >- - The unique identifier of the source account from our customer’s - platform. - validation: - maxLength: 1024 - target_account_id: - type: optional - docs: >- - The unique identifier of the target account from the third party - software. - validation: - maxLength: 1024 - source_account_name: - type: optional - docs: The name of the source account as stored in our customer’s platform. - validation: - maxLength: 1024 - source_account_number: - type: optional - docs: >- - The human-readable account number of the source account as stored in - our customer’s platform. - validation: - maxLength: 1024 - target_account_name: - type: optional - docs: The name of the target account from the third party software. - validation: - maxLength: 1024 - currency: - type: optional - docs: >- - The currency code of the bank feed. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - feed_status: - type: optional - docs: |- - The status of the bank feed. - - * `ACTIVE` - ACTIVE - * `INACTIVE` - INACTIVE - feed_start_date: - type: optional - docs: The start date of the bank feed’s transactions. - source_account_balance: - type: optional - docs: The current balance of funds in the source account. - account_type: - type: optional - docs: |- - The type of the account. - - * `BANK` - BANK - * `CREDIT_CARD` - CREDIT_CARD - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: optional> - access: read-only - remote_data: optional>>> - source: - openapi: accounting_v3.yml - BankFeedAccountAccountTypeEnum: - enum: - - BANK - - CREDIT_CARD - docs: |- - * `BANK` - BANK - * `CREDIT_CARD` - CREDIT_CARD - source: - openapi: accounting_v3.yml - BankFeedAccountRequestCurrency: - discriminated: false - docs: >- - The currency code of the bank feed. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - BankFeedAccountRequestFeedStatus: - discriminated: false - docs: |- - The status of the bank feed. - - * `ACTIVE` - ACTIVE - * `INACTIVE` - INACTIVE - union: - - FeedStatusEnum - - string - source: - openapi: accounting_v3.yml - inline: true - BankFeedAccountRequestAccountType: - discriminated: false - docs: |- - The type of the account. - - * `BANK` - BANK - * `CREDIT_CARD` - CREDIT_CARD - union: - - BankFeedAccountAccountTypeEnum - - string - source: - openapi: accounting_v3.yml - inline: true - BankFeedAccountRequest: - docs: >- - # The BankFeedAccount Object - - ### Description - - The `BankFeedAccount` object represents a bank feed account, detailing - various attributes including account identifiers, names, currency, and - balance information. This object is central to managing and tracking bank - feed accounts within the system. - - - ### Usage Example - - Fetch from the `GET BankFeedAccount` endpoint to view details of a bank - feed account. - properties: - source_account_id: - type: optional - docs: >- - The unique identifier of the source account from our customer’s - platform. - validation: - maxLength: 1024 - target_account_id: - type: optional - docs: >- - The unique identifier of the target account from the third party - software. - validation: - maxLength: 1024 - source_account_name: - type: optional - docs: The name of the source account as stored in our customer’s platform. - validation: - maxLength: 1024 - source_account_number: - type: optional - docs: >- - The human-readable account number of the source account as stored in - our customer’s platform. - validation: - maxLength: 1024 - target_account_name: - type: optional - docs: The name of the target account from the third party software. - validation: - maxLength: 1024 - currency: - type: optional - docs: >- - The currency code of the bank feed. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - feed_status: - type: optional - docs: |- - The status of the bank feed. - - * `ACTIVE` - ACTIVE - * `INACTIVE` - INACTIVE - feed_start_date: - type: optional - docs: The start date of the bank feed’s transactions. - source_account_balance: - type: optional - docs: The current balance of funds in the source account. - account_type: - type: optional - docs: |- - The type of the account. - - * `BANK` - BANK - * `CREDIT_CARD` - CREDIT_CARD - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - BankFeedAccountResponse: - properties: - model: BankFeedAccount - warnings: list - errors: list - logs: optional> - source: - openapi: accounting_v3.yml - BankFeedTransactionBankFeedAccount: - discriminated: false - docs: The bank feed account associated with the transaction. - union: - - type: string - validation: - format: uuid - - BankFeedAccount - source: - openapi: accounting_v3.yml - inline: true - BankFeedTransactionCreditOrDebit: - discriminated: false - docs: |- - If the transaction is of type debit or credit. - - * `CREDIT` - CREDIT - * `DEBIT` - DEBIT - union: - - CreditOrDebitEnum - - string - source: - openapi: accounting_v3.yml - inline: true - BankFeedTransaction: - docs: >- - # The BankFeedTransaction Object - - ### Description - - The `BankFeedTransaction` object is used to represent transactions linked - to a bank feed account. This includes details about the transaction such - as the date, amount, description, and type. - - - ### Usage Example - - Fetch from the `GET BankFeedTransaction` endpoint to view details of a - transaction associated with a bank feed account. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - bank_feed_account: - type: optional - docs: The bank feed account associated with the transaction. - transaction_date: - type: optional - docs: The date that the transaction occurred. - posted_date: - type: optional - docs: The date the transaction was posted to the bank account. - amount: - type: optional - docs: The amount of the transaction. - description: - type: optional - docs: The description of the transaction. - validation: - maxLength: 1024 - transaction_type: - type: optional - docs: The underlying type of the transaction. - validation: - maxLength: 1024 - payee: - type: optional - docs: >- - The person or merchant who initiated the transaction, or - alternatively, to whom the transaction was paid. - validation: - maxLength: 1024 - credit_or_debit: - type: optional - docs: |- - If the transaction is of type debit or credit. - - * `CREDIT` - CREDIT - * `DEBIT` - DEBIT - source_transaction_id: - type: optional - docs: The customer’s identifier for the transaction. - validation: - maxLength: 1024 - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - is_processed: - type: optional - docs: >- - Whether or not this transaction has been processed by the external - system. For example, NetSuite writes this field as True when the - SuiteApp has processed the transaction. - access: read-only - source: - openapi: accounting_v3.yml - BankFeedTransactionRequestRequestBankFeedAccount: - discriminated: false - docs: The bank feed account associated with the transaction. - union: - - type: string - validation: - format: uuid - - BankFeedAccount - source: - openapi: accounting_v3.yml - inline: true - BankFeedTransactionRequestRequestCreditOrDebit: - discriminated: false - docs: |- - If the transaction is of type debit or credit. - - * `CREDIT` - CREDIT - * `DEBIT` - DEBIT - union: - - CreditOrDebitEnum - - string - source: - openapi: accounting_v3.yml - inline: true - BankFeedTransactionRequestRequest: - docs: >- - # The BankFeedTransaction Object - - ### Description - - The `BankFeedTransaction` object is used to represent transactions linked - to a bank feed account. This includes details about the transaction such - as the date, amount, description, and type. - - - ### Usage Example - - Fetch from the `GET BankFeedTransaction` endpoint to view details of a - transaction associated with a bank feed account. - properties: - bank_feed_account: - type: optional - docs: The bank feed account associated with the transaction. - transaction_date: - type: optional - docs: The date that the transaction occurred. - posted_date: - type: optional - docs: The date the transaction was posted to the bank account. - amount: - type: optional - docs: The amount of the transaction. - description: - type: optional - docs: The description of the transaction. - validation: - maxLength: 1024 - transaction_type: - type: optional - docs: The underlying type of the transaction. - validation: - maxLength: 1024 - payee: - type: optional - docs: >- - The person or merchant who initiated the transaction, or - alternatively, to whom the transaction was paid. - validation: - maxLength: 1024 - credit_or_debit: - type: optional - docs: |- - If the transaction is of type debit or credit. - - * `CREDIT` - CREDIT - * `DEBIT` - DEBIT - source_transaction_id: - type: optional - docs: The customer’s identifier for the transaction. - validation: - maxLength: 1024 - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - BankFeedTransactionResponse: - properties: - model: BankFeedTransaction - warnings: list - errors: list - logs: optional> - source: - openapi: accounting_v3.yml - CashFlowStatementCurrency: - discriminated: false - docs: >- - The cash flow statement's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - CashFlowStatementCompany: - discriminated: false - docs: The company the cash flow statement belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - CashFlowStatement: - docs: >- - # The CashFlowStatement Object - - ### Description - - The `CashFlowStatement` object shows operating activities, investing - activities, and financing activities over a period of time (month, - quarter, or year). - - - ### Usage Example - - Fetch from the `LIST CashFlowStatements` endpoint and view a company's - cash flow statements. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The cash flow statement's name. - currency: - type: optional - docs: >- - The cash flow statement's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - company: - type: optional - docs: The company the cash flow statement belongs to. - start_period: - type: optional - docs: The cash flow statement's start period. - end_period: - type: optional - docs: The cash flow statement's end period. - cash_at_beginning_of_period: - type: optional - docs: >- - Cash and cash equivalents at the beginning of the cash flow - statement's period. - cash_at_end_of_period: - type: optional - docs: >- - Cash and cash equivalents at the beginning of the cash flow - statement's period. - operating_activities: - type: optional> - access: read-only - investing_activities: - type: optional> - access: read-only - financing_activities: - type: optional> - access: read-only - remote_generated_at: - type: optional - docs: >- - The time that cash flow statement was generated by the accounting - system. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - CategoriesEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - docs: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - source: - openapi: accounting_v3.yml - CategoryEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - docs: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - source: - openapi: accounting_v3.yml - CategoryTypeEnum: - enum: - - CLASS - - DEPARTMENT - docs: |- - * `CLASS` - CLASS - * `DEPARTMENT` - DEPARTMENT - source: - openapi: accounting_v3.yml - ClassificationEnum: - enum: - - ASSET - - EQUITY - - EXPENSE - - LIABILITY - - REVENUE - docs: |- - * `ASSET` - ASSET - * `EQUITY` - EQUITY - * `EXPENSE` - EXPENSE - * `LIABILITY` - LIABILITY - * `REVENUE` - REVENUE - source: - openapi: accounting_v3.yml - CommonModelScopeApi: - properties: - common_models: - docs: The common models you want to update the scopes for - type: list - source: - openapi: accounting_v3.yml - CommonModelScopesBodyRequest: - properties: - model_id: - type: string - validation: - minLength: 1 - enabled_actions: list - disabled_fields: list - source: - openapi: accounting_v3.yml - CompanyInfo: - docs: >- - # The CompanyInfo Object - - ### Description - - The `CompanyInfo` object contains information about the company of the - linked account. If the company has multiple entities (also known as - subsidiaries), each entity may show up as a single `CompanyInfo` record. - - - ### Usage Example - - Fetch from the `GET CompanyInfo` endpoint and view a company's - information. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The company's name. - legal_name: - type: optional - docs: The company's legal name. - tax_number: - type: optional - docs: The company's tax number. - fiscal_year_end_month: - type: optional - docs: The company's fiscal year end month. - validation: - min: 1 - max: 12 - fiscal_year_end_day: - type: optional - docs: The company's fiscal year end day. - validation: - min: 1 - max: 31 - currency: optional - remote_created_at: - type: optional - docs: When the third party's company was created. - urls: - type: optional>> - docs: The company's urls. - addresses: optional> - phone_numbers: optional> - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - ComponentTypeEnum: - enum: - - SALES - - PURCHASE - docs: |- - * `SALES` - SALES - * `PURCHASE` - PURCHASE - source: - openapi: accounting_v3.yml - ContactStatus: - discriminated: false - docs: |- - The contact's status - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - union: - - Status7D1Enum - - string - source: - openapi: accounting_v3.yml - inline: true - ContactAddressesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Address - source: - openapi: accounting_v3.yml - inline: true - Contact: - docs: >- - # The Contact Object - - ### Description - - A `Contact` is an individual or business entity to which products and - services are sold to or purchased from. The `Contact` model contains both - Customers, in which products and services are sold to, and Vendors (or - Suppliers), in which products and services are purchased from. - - * A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. - - * A `Contact` is a customer if the `is_customer` property is true. - - - ### Usage Example - - Fetch from the `LIST Contacts` endpoint and view a company's contacts. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The contact's name. - is_supplier: - type: optional - docs: Whether the contact is a supplier. - is_customer: - type: optional - docs: Whether the contact is a customer. - email_address: - type: optional - docs: The contact's email address. - tax_number: - type: optional - docs: The contact's tax number. - status: - type: optional - docs: |- - The contact's status - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - currency: - type: optional - docs: The currency the contact's transactions are in. - remote_updated_at: - type: optional - docs: When the third party's contact was updated. - company: - type: optional - docs: The company the contact belongs to. - validation: - format: uuid - addresses: - type: optional>> - docs: '`Address` object IDs for the given `Contacts` object.' - phone_numbers: - type: optional> - docs: '`AccountingPhoneNumber` object for the given `Contacts` object.' - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - ContactRequestStatus: - discriminated: false - docs: |- - The contact's status - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - union: - - Status7D1Enum - - string - source: - openapi: accounting_v3.yml - inline: true - ContactRequestAddressesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Address - source: - openapi: accounting_v3.yml - inline: true - ContactRequest: - docs: >- - # The Contact Object - - ### Description - - A `Contact` is an individual or business entity to which products and - services are sold to or purchased from. The `Contact` model contains both - Customers, in which products and services are sold to, and Vendors (or - Suppliers), in which products and services are purchased from. - - * A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. - - * A `Contact` is a customer if the `is_customer` property is true. - - - ### Usage Example - - Fetch from the `LIST Contacts` endpoint and view a company's contacts. - properties: - name: - type: optional - docs: The contact's name. - is_supplier: - type: optional - docs: Whether the contact is a supplier. - is_customer: - type: optional - docs: Whether the contact is a customer. - email_address: - type: optional - docs: The contact's email address. - tax_number: - type: optional - docs: The contact's tax number. - status: - type: optional - docs: |- - The contact's status - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - currency: - type: optional - docs: The currency the contact's transactions are in. - company: - type: optional - docs: The company the contact belongs to. - validation: - format: uuid - addresses: - type: optional>> - docs: '`Address` object IDs for the given `Contacts` object.' - phone_numbers: - type: optional> - docs: '`AccountingPhoneNumber` object for the given `Contacts` object.' - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - ContactResponse: - properties: - model: Contact - warnings: list - errors: list - logs: optional> - source: - openapi: accounting_v3.yml - CountryEnum: - enum: - - AF - - AX - - AL - - DZ - - AS - - AD - - AO - - AI - - AQ - - AG - - AR - - AM - - AW - - AU - - AT - - AZ - - BS - - BH - - BD - - BB - - BY - - BE - - BZ - - BJ - - BM - - BT - - BO - - BQ - - BA - - BW - - BV - - BR - - IO - - BN - - BG - - BF - - BI - - CV - - KH - - CM - - CA - - KY - - CF - - TD - - CL - - CN - - CX - - CC - - CO - - KM - - CG - - CD - - CK - - CR - - CI - - HR - - CU - - CW - - CY - - CZ - - DK - - DJ - - DM - - DO - - EC - - EG - - SV - - GQ - - ER - - EE - - SZ - - ET - - FK - - FO - - FJ - - FI - - FR - - GF - - PF - - TF - - GA - - GM - - GE - - DE - - GH - - GI - - GR - - GL - - GD - - GP - - GU - - GT - - GG - - GN - - GW - - GY - - HT - - HM - - VA - - HN - - HK - - HU - - IS - - IN - - ID - - IR - - IQ - - IE - - IM - - IL - - IT - - JM - - JP - - JE - - JO - - KZ - - KE - - KI - - KW - - KG - - LA - - LV - - LB - - LS - - LR - - LY - - LI - - LT - - LU - - MO - - MG - - MW - - MY - - MV - - ML - - MT - - MH - - MQ - - MR - - MU - - YT - - MX - - FM - - MD - - MC - - MN - - ME - - MS - - MA - - MZ - - MM - - NA - - NR - - NP - - NL - - NC - - NZ - - NI - - NE - - NG - - NU - - NF - - KP - - MK - - MP - - 'NO' - - OM - - PK - - PW - - PS - - PA - - PG - - PY - - PE - - PH - - PN - - PL - - PT - - PR - - QA - - RE - - RO - - RU - - RW - - BL - - SH - - KN - - LC - - MF - - PM - - VC - - WS - - SM - - ST - - SA - - SN - - RS - - SC - - SL - - SG - - SX - - SK - - SI - - SB - - SO - - ZA - - GS - - KR - - SS - - ES - - LK - - SD - - SR - - SJ - - SE - - CH - - SY - - TW - - TJ - - TZ - - TH - - TL - - TG - - TK - - TO - - TT - - TN - - TR - - TM - - TC - - TV - - UG - - UA - - AE - - GB - - UM - - US - - UY - - UZ - - VU - - VE - - VN - - VG - - VI - - WF - - EH - - YE - - ZM - - ZW - docs: |- - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - source: - openapi: accounting_v3.yml - CreditNoteStatus: - discriminated: false - docs: |- - The credit note's status. - - * `SUBMITTED` - SUBMITTED - * `AUTHORIZED` - AUTHORIZED - * `PAID` - PAID - union: - - CreditNoteStatusEnum - - string - source: - openapi: accounting_v3.yml - inline: true - CreditNoteContact: - discriminated: false - docs: The credit note's contact. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - CreditNoteCompany: - discriminated: false - docs: The company the credit note belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - CreditNoteTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - CreditNoteCurrency: - discriminated: false - docs: >- - The credit note's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - CreditNotePaymentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Payment - source: - openapi: accounting_v3.yml - inline: true - CreditNoteAppliedPaymentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - PaymentLineItem - source: - openapi: accounting_v3.yml - inline: true - CreditNoteAccountingPeriod: - discriminated: false - docs: The accounting period that the CreditNote was generated in. - union: - - type: string - validation: - format: uuid - - AccountingPeriod - source: - openapi: accounting_v3.yml - inline: true - CreditNote: - docs: >- - # The CreditNote Object - - ### Description - - A `CreditNote` is transaction issued to a customer, indicating a reduction - or cancellation of the amount owed by the customer. It is most generally - used as an adjustment note used to rectify errors, returns, or - overpayments related to a sales transaction. A `CreditNote` can be applied - to *Accounts Receivable* Invoices to decrease the overall amount of the - Invoice. - - - ### Usage Example - - Fetch from the `LIST CreditNotes` endpoint and view a company's credit - notes. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - transaction_date: - type: optional - docs: The credit note's transaction date. - status: - type: optional - docs: |- - The credit note's status. - - * `SUBMITTED` - SUBMITTED - * `AUTHORIZED` - AUTHORIZED - * `PAID` - PAID - number: - type: optional - docs: The credit note's number. - contact: - type: optional - docs: The credit note's contact. - company: - type: optional - docs: The company the credit note belongs to. - exchange_rate: - type: optional - docs: The credit note's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - total_amount: - type: optional - docs: The credit note's total amount. - remaining_credit: - type: optional - docs: >- - The amount of value remaining in the credit note that the customer can - use. - inclusive_of_tax: - type: optional - docs: >- - If the transaction is inclusive or exclusive of tax. `True` if - inclusive, `False` if exclusive. - line_items: - type: optional> - access: read-only - tracking_categories: optional>> - currency: - type: optional - docs: >- - The credit note's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - remote_created_at: - type: optional - docs: When the third party's credit note was created. - remote_updated_at: - type: optional - docs: When the third party's credit note was updated. - payments: - type: optional>> - docs: Array of `Payment` object IDs - applied_payments: - type: optional>> - docs: >- - A list of the Payment Applied to Lines common models related to a - given Invoice, Credit Note, or Journal Entry. - accounting_period: - type: optional - docs: The accounting period that the CreditNote was generated in. - applied_to_lines: - type: optional> - docs: >- - A list of the CreditNote Applied to Lines common models related to a - given Credit Note - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - CreditNoteApplyLineForCreditNoteInvoice: - discriminated: false - union: - - type: string - validation: - format: uuid - - Invoice - source: - openapi: accounting_v3.yml - inline: true - CreditNoteApplyLineForCreditNote: - docs: >- - # The CreditNoteApplyLine Object - - ### Description - - The `CreditNoteApplyLine` is attached to the CreditNote model. - - - ### Usage Example - - Fetch from the `GET CreditNote` endpoint and view the invoice's applied to - lines. - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - invoice: optional - applied_date: - type: optional - docs: Date that the credit note is applied to the invoice. - applied_amount: - type: optional - docs: The amount of the Credit Note applied to the invoice. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - source: - openapi: accounting_v3.yml - CreditNoteApplyLineForCreditNoteRequestInvoice: - discriminated: false - union: - - type: string - validation: - format: uuid - - Invoice - source: - openapi: accounting_v3.yml - inline: true - CreditNoteApplyLineForCreditNoteRequest: - docs: >- - # The CreditNoteApplyLine Object - - ### Description - - The `CreditNoteApplyLine` is attached to the CreditNote model. - - - ### Usage Example - - Fetch from the `GET CreditNote` endpoint and view the invoice's applied to - lines. - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - invoice: optional - applied_date: - type: optional - docs: Date that the credit note is applied to the invoice. - applied_amount: - type: optional - docs: The amount of the Credit Note applied to the invoice. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - CreditNoteApplyLineForInvoiceCreditNote: - discriminated: false - union: - - type: string - validation: - format: uuid - - CreditNote - source: - openapi: accounting_v3.yml - inline: true - CreditNoteApplyLineForInvoice: - docs: >- - # The CreditNoteApplyLine Object - - ### Description - - The `CreditNoteApplyLine` is attached to the CreditNote model. - - - ### Usage Example - - Fetch from the `GET CreditNote` endpoint and view the invoice's applied to - lines. - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - credit_note: optional - applied_date: - type: optional - docs: Date that the credit note is applied to the invoice. - applied_amount: - type: optional - docs: The amount of the Credit Note applied to the invoice. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - source: - openapi: accounting_v3.yml - CreditNoteLineItemItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Item - source: - openapi: accounting_v3.yml - inline: true - CreditNoteLineItemCompany: - discriminated: false - docs: The company the credit note belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - CreditNoteLineItemContact: - discriminated: false - docs: The credit note's contact. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - CreditNoteLineItemProject: - discriminated: false - union: - - type: string - validation: - format: uuid - - Project - source: - openapi: accounting_v3.yml - inline: true - CreditNoteLineItem: - docs: >- - # The CreditNoteLineItem Object - - ### Description - - The `CreditNoteLineItem` object is used to represent a credit note's line - items. - - - ### Usage Example - - Fetch from the `GET CreditNote` endpoint and view the credit note's line - items. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - item: optional - name: - type: optional - docs: The credit note line item's name. - description: - type: optional - docs: The description of the item that is owed. - quantity: - type: optional - docs: The credit note line item's quantity. - validation: - pattern: ^-?\d{0,24}(?:\.\d{0,8})?$ - memo: - type: optional - docs: The credit note line item's memo. - unit_price: - type: optional - docs: The credit note line item's unit price. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - tax_rate: - type: optional - docs: The tax rate that applies to this line item. - validation: - format: uuid - total_line_amount: - type: optional - docs: The credit note line item's total. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - tracking_category: - type: optional - docs: The credit note line item's associated tracking category. - validation: - format: uuid - availability: deprecated - tracking_categories: - type: optional>> - docs: The credit note line item's associated tracking categories. - account: - type: optional - docs: The credit note line item's account. - validation: - format: uuid - company: - type: optional - docs: The company the credit note belongs to. - contact: - type: optional - docs: The credit note's contact. - project: optional - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - source: - openapi: accounting_v3.yml - CreditNoteLineItemRequestItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Item - source: - openapi: accounting_v3.yml - inline: true - CreditNoteLineItemRequestCompany: - discriminated: false - docs: The company the credit note belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - CreditNoteLineItemRequestContact: - discriminated: false - docs: The credit note's contact. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - CreditNoteLineItemRequestProject: - discriminated: false - union: - - type: string - validation: - format: uuid - - Project - source: - openapi: accounting_v3.yml - inline: true - CreditNoteLineItemRequest: - docs: >- - # The CreditNoteLineItem Object - - ### Description - - The `CreditNoteLineItem` object is used to represent a credit note's line - items. - - - ### Usage Example - - Fetch from the `GET CreditNote` endpoint and view the credit note's line - items. - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - item: optional - name: - type: optional - docs: The credit note line item's name. - description: - type: optional - docs: The description of the item that is owed. - quantity: - type: optional - docs: The credit note line item's quantity. - validation: - pattern: ^-?\d{0,24}(?:\.\d{0,8})?$ - memo: - type: optional - docs: The credit note line item's memo. - unit_price: - type: optional - docs: The credit note line item's unit price. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - tax_rate: - type: optional - docs: The tax rate that applies to this line item. - validation: - format: uuid - total_line_amount: - type: optional - docs: The credit note line item's total. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - tracking_category: - type: optional - docs: The credit note line item's associated tracking category. - validation: - format: uuid - availability: deprecated - tracking_categories: - type: optional>> - docs: The credit note line item's associated tracking categories. - account: - type: optional - docs: The credit note line item's account. - validation: - format: uuid - company: - type: optional - docs: The company the credit note belongs to. - contact: - type: optional - docs: The credit note's contact. - project: optional - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - CreditNoteRequestStatus: - discriminated: false - docs: |- - The credit note's status. - - * `SUBMITTED` - SUBMITTED - * `AUTHORIZED` - AUTHORIZED - * `PAID` - PAID - union: - - CreditNoteStatusEnum - - string - source: - openapi: accounting_v3.yml - inline: true - CreditNoteRequestContact: - discriminated: false - docs: The credit note's contact. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - CreditNoteRequestCompany: - discriminated: false - docs: The company the credit note belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - CreditNoteRequestLineItemsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - CreditNoteLineItemRequest - source: - openapi: accounting_v3.yml - inline: true - CreditNoteRequestTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - CreditNoteRequestCurrency: - discriminated: false - docs: >- - The credit note's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - CreditNoteRequestPaymentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Payment - source: - openapi: accounting_v3.yml - inline: true - CreditNoteRequestAppliedPaymentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - PaymentLineItem - source: - openapi: accounting_v3.yml - inline: true - CreditNoteRequestAccountingPeriod: - discriminated: false - docs: The accounting period that the CreditNote was generated in. - union: - - type: string - validation: - format: uuid - - AccountingPeriod - source: - openapi: accounting_v3.yml - inline: true - CreditNoteRequest: - docs: >- - # The CreditNote Object - - ### Description - - A `CreditNote` is transaction issued to a customer, indicating a reduction - or cancellation of the amount owed by the customer. It is most generally - used as an adjustment note used to rectify errors, returns, or - overpayments related to a sales transaction. A `CreditNote` can be applied - to *Accounts Receivable* Invoices to decrease the overall amount of the - Invoice. - - - ### Usage Example - - Fetch from the `LIST CreditNotes` endpoint and view a company's credit - notes. - properties: - transaction_date: - type: optional - docs: The credit note's transaction date. - status: - type: optional - docs: |- - The credit note's status. - - * `SUBMITTED` - SUBMITTED - * `AUTHORIZED` - AUTHORIZED - * `PAID` - PAID - number: - type: optional - docs: The credit note's number. - contact: - type: optional - docs: The credit note's contact. - company: - type: optional - docs: The company the credit note belongs to. - exchange_rate: - type: optional - docs: The credit note's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - total_amount: - type: optional - docs: The credit note's total amount. - remaining_credit: - type: optional - docs: >- - The amount of value remaining in the credit note that the customer can - use. - inclusive_of_tax: - type: optional - docs: >- - If the transaction is inclusive or exclusive of tax. `True` if - inclusive, `False` if exclusive. - line_items: optional> - tracking_categories: optional>> - currency: - type: optional - docs: >- - The credit note's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - payments: - type: optional>> - docs: Array of `Payment` object IDs - applied_payments: - type: optional>> - docs: >- - A list of the Payment Applied to Lines common models related to a - given Invoice, Credit Note, or Journal Entry. - accounting_period: - type: optional - docs: The accounting period that the CreditNote was generated in. - applied_to_lines: - type: optional> - docs: >- - A list of the CreditNote Applied to Lines common models related to a - given Credit Note - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - CreditNoteResponse: - properties: - model: CreditNote - warnings: list - errors: list - logs: optional> - source: - openapi: accounting_v3.yml - CreditNoteStatusEnum: - enum: - - SUBMITTED - - AUTHORIZED - - PAID - docs: |- - * `SUBMITTED` - SUBMITTED - * `AUTHORIZED` - AUTHORIZED - * `PAID` - PAID - source: - openapi: accounting_v3.yml - CreditOrDebitEnum: - enum: - - CREDIT - - DEBIT - docs: |- - * `CREDIT` - CREDIT - * `DEBIT` - DEBIT - source: - openapi: accounting_v3.yml - DataPassthroughRequest: - docs: >- - # The DataPassthrough Object - - ### Description - - The `DataPassthrough` object is used to send information to an - otherwise-unsupported third-party endpoint. - - - ### Usage Example - - Create a `DataPassthrough` to get team hierarchies from your Rippling - integration. - properties: - method: MethodEnum - path: - type: string - docs: The path of the request in the third party's platform. - validation: - minLength: 1 - base_url_override: - type: optional - docs: An optional override of the third party's base url for the request. - validation: - minLength: 1 - data: - type: optional - docs: >- - The data with the request. You must include a `request_format` - parameter matching the data's format - validation: - minLength: 1 - multipart_form_data: - type: optional> - docs: >- - Pass an array of `MultipartFormField` objects in here instead of using - the `data` param if `request_format` is set to `MULTIPART`. - headers: - type: optional> - docs: >- - The headers to use for the request (Merge will handle the account's - authorization headers). `Content-Type` header is required for - passthrough. Choose content type corresponding to expected format of - receiving server. - request_format: optional - normalize_response: - type: optional - docs: >- - Optional. If true, the response will always be an object of the form - `{"type": T, "value": ...}` where `T` will be one of `string, boolean, - number, null, array, object`. - source: - openapi: accounting_v3.yml - DebugModeLog: - properties: - log_id: string - dashboard_view: string - log_summary: DebugModelLogSummary - source: - openapi: accounting_v3.yml - DebugModelLogSummary: - properties: - url: string - method: string - status_code: integer - source: - openapi: accounting_v3.yml - EmployeeCompany: - discriminated: false - docs: The subsidiary that the employee belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - EmployeeStatus: - discriminated: false - docs: |- - The employee's status in the accounting system. - - * `ACTIVE` - ACTIVE - * `INACTIVE` - INACTIVE - union: - - Status895Enum - - string - source: - openapi: accounting_v3.yml - inline: true - Employee: - docs: >- - # The Employee Object - - ### Description - - An `Employee` is an individual who works for the company of the linked - account. The `Employee` model contains both contractors and full time - employees. - - * An `Employee` is a contractor if `is_contractor` property is `True` - - * An `Employee` is a full time employee if `is_contractor` property is - `False` - - - ### Usage Example - - Fetch from the `LIST Employees` endpoint and view a company's employees. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - first_name: - type: optional - docs: The employee's first name. - validation: - maxLength: 255 - last_name: - type: optional - docs: The employee's last name. - validation: - maxLength: 255 - is_contractor: - type: optional - docs: '`True` if the employee is a contractor, `False` if not.' - employee_number: - type: optional - docs: The employee's internal identification number. - validation: - maxLength: 50 - email_address: - type: optional - docs: The employee's email address. - company: - type: optional - docs: The subsidiary that the employee belongs to. - status: - type: EmployeeStatus - docs: |- - The employee's status in the accounting system. - - * `ACTIVE` - ACTIVE - * `INACTIVE` - INACTIVE - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - EnabledActionsEnum: - enum: - - READ - - WRITE - docs: |- - * `READ` - READ - * `WRITE` - WRITE - source: - openapi: accounting_v3.yml - EncodingEnum: - enum: - - RAW - - BASE64 - - GZIP_BASE64 - docs: |- - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - source: - openapi: accounting_v3.yml - ErrorValidationProblem: - properties: - source: optional - title: string - detail: string - problem_type: string - source: - openapi: accounting_v3.yml - EventTypeEnum: - enum: - - CREATED_REMOTE_PRODUCTION_API_KEY - - DELETED_REMOTE_PRODUCTION_API_KEY - - CREATED_TEST_API_KEY - - DELETED_TEST_API_KEY - - REGENERATED_PRODUCTION_API_KEY - - REGENERATED_WEBHOOK_SIGNATURE - - INVITED_USER - - TWO_FACTOR_AUTH_ENABLED - - TWO_FACTOR_AUTH_DISABLED - - DELETED_LINKED_ACCOUNT - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - CREATED_DESTINATION - - DELETED_DESTINATION - - CHANGED_DESTINATION - - CHANGED_SCOPES - - CHANGED_PERSONAL_INFORMATION - - CHANGED_ORGANIZATION_SETTINGS - - ENABLED_INTEGRATION - - DISABLED_INTEGRATION - - ENABLED_CATEGORY - - DISABLED_CATEGORY - - CHANGED_PASSWORD - - RESET_PASSWORD - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - FORCED_LINKED_ACCOUNT_RESYNC - - MUTED_ISSUE - - GENERATED_MAGIC_LINK - - ENABLED_MERGE_WEBHOOK - - DISABLED_MERGE_WEBHOOK - - MERGE_WEBHOOK_TARGET_CHANGED - - END_USER_CREDENTIALS_ACCESSED - docs: >- - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - source: - openapi: accounting_v3.yml - ExpenseAccount: - discriminated: false - docs: The expense's payment account. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - ExpenseContact: - discriminated: false - docs: The expense's contact. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - ExpenseCurrency: - discriminated: false - docs: >- - The expense's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - ExpenseCompany: - discriminated: false - docs: The company the expense belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - ExpenseEmployee: - discriminated: false - docs: The employee this overall transaction relates to. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: accounting_v3.yml - inline: true - ExpenseTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - ExpenseAccountingPeriod: - discriminated: false - docs: The accounting period that the Expense was generated in. - union: - - type: string - validation: - format: uuid - - AccountingPeriod - source: - openapi: accounting_v3.yml - inline: true - Expense: - docs: >- - # The Expense Object - - ### Description - - The `Expense` object is used to represent a direct purchase by a business, - typically made with a check, credit card, or cash. Each `Expense` object - is dedicated to a grouping of expenses, with each expense recorded in the - lines object. - - - The `Expense` object is used also used to represent refunds to direct - purchases. Refunds can be distinguished from purchases by the amount sign - of the records. Expense objects with a negative amount are purchases and - `Expense` objects with a positive amount are refunds to those purchases. - - - ### Usage Example - - Fetch from the `GET Expense` endpoint and view a company's expense. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - transaction_date: - type: optional - docs: When the transaction occurred. - remote_created_at: - type: optional - docs: When the expense was created. - account: - type: optional - docs: The expense's payment account. - contact: - type: optional - docs: The expense's contact. - total_amount: - type: optional - docs: The expense's total amount. - sub_total: - type: optional - docs: The expense's total amount before tax. - total_tax_amount: - type: optional - docs: The expense's total tax amount. - currency: - type: optional - docs: >- - The expense's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: optional - docs: The expense's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - inclusive_of_tax: - type: optional - docs: >- - If the transaction is inclusive or exclusive of tax. `True` if - inclusive, `False` if exclusive. - company: - type: optional - docs: The company the expense belongs to. - employee: - type: optional - docs: The employee this overall transaction relates to. - memo: - type: optional - docs: The expense's private note. - lines: optional> - tracking_categories: optional>> - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - accounting_period: - type: optional - docs: The accounting period that the Expense was generated in. - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - ExpenseLineItem: - discriminated: false - docs: The line's item. - union: - - type: string - validation: - format: uuid - - Item - source: - openapi: accounting_v3.yml - inline: true - ExpenseLineTrackingCategory: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - ExpenseLineTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - ExpenseLineEmployee: - discriminated: false - docs: The employee this overall transaction relates to. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: accounting_v3.yml - inline: true - ExpenseLineAccount: - discriminated: false - docs: The expense's payment account. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - ExpenseLineContact: - discriminated: false - docs: The expense's contact. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - ExpenseLineProject: - discriminated: false - union: - - type: string - validation: - format: uuid - - Project - source: - openapi: accounting_v3.yml - inline: true - ExpenseLine: - docs: |- - # The ExpenseLine Object - ### Description - The `ExpenseLine` object is used to represent an expense's line items. - - ### Usage Example - Fetch from the `GET Expense` endpoint and view the expense's line items. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - item: - type: optional - docs: The line's item. - net_amount: - type: optional - docs: The line's net amount. - tracking_category: - type: optional - availability: deprecated - tracking_categories: - type: optional>> - docs: The expense line item's associated tracking categories. - company: - type: optional - docs: The company the expense belongs to. - validation: - format: uuid - employee: - type: optional - docs: The employee this overall transaction relates to. - currency: - type: optional - docs: >- - The expense line item's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - account: - type: optional - docs: The expense's payment account. - contact: - type: optional - docs: The expense's contact. - project: optional - description: - type: optional - docs: The description of the item that was purchased by the company. - exchange_rate: - type: optional - docs: The expense line item's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - tax_rate: - type: optional - docs: The tax rate that applies to this line item. - validation: - format: uuid - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - source: - openapi: accounting_v3.yml - ExpenseLineRequestItem: - discriminated: false - docs: The line's item. - union: - - type: string - validation: - format: uuid - - Item - source: - openapi: accounting_v3.yml - inline: true - ExpenseLineRequestTrackingCategory: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - ExpenseLineRequestTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - ExpenseLineRequestEmployee: - discriminated: false - docs: The employee this overall transaction relates to. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: accounting_v3.yml - inline: true - ExpenseLineRequestCurrency: - discriminated: false - docs: >- - The expense line item's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - ExpenseLineRequestAccount: - discriminated: false - docs: The expense's payment account. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - ExpenseLineRequestContact: - discriminated: false - docs: The expense's contact. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - ExpenseLineRequestProject: - discriminated: false - union: - - type: string - validation: - format: uuid - - Project - source: - openapi: accounting_v3.yml - inline: true - ExpenseLineRequest: - docs: |- - # The ExpenseLine Object - ### Description - The `ExpenseLine` object is used to represent an expense's line items. - - ### Usage Example - Fetch from the `GET Expense` endpoint and view the expense's line items. - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - item: - type: optional - docs: The line's item. - net_amount: - type: optional - docs: The line's net amount. - tracking_category: - type: optional - availability: deprecated - tracking_categories: - type: optional>> - docs: The expense line item's associated tracking categories. - company: - type: optional - docs: The company the expense belongs to. - validation: - format: uuid - employee: - type: optional - docs: The employee this overall transaction relates to. - currency: - type: optional - docs: >- - The expense line item's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - account: - type: optional - docs: The expense's payment account. - contact: - type: optional - docs: The expense's contact. - project: optional - description: - type: optional - docs: The description of the item that was purchased by the company. - exchange_rate: - type: optional - docs: The expense line item's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - tax_rate: - type: optional - docs: The tax rate that applies to this line item. - validation: - format: uuid - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - ExpenseRequestAccount: - discriminated: false - docs: The expense's payment account. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - ExpenseRequestContact: - discriminated: false - docs: The expense's contact. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - ExpenseRequestCompany: - discriminated: false - docs: The company the expense belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - ExpenseRequestEmployee: - discriminated: false - docs: The employee this overall transaction relates to. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: accounting_v3.yml - inline: true - ExpenseRequestTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - ExpenseRequestAccountingPeriod: - discriminated: false - docs: The accounting period that the Expense was generated in. - union: - - type: string - validation: - format: uuid - - AccountingPeriod - source: - openapi: accounting_v3.yml - inline: true - ExpenseRequest: - docs: >- - # The Expense Object - - ### Description - - The `Expense` object is used to represent a direct purchase by a business, - typically made with a check, credit card, or cash. Each `Expense` object - is dedicated to a grouping of expenses, with each expense recorded in the - lines object. - - - The `Expense` object is used also used to represent refunds to direct - purchases. Refunds can be distinguished from purchases by the amount sign - of the records. Expense objects with a negative amount are purchases and - `Expense` objects with a positive amount are refunds to those purchases. - - - ### Usage Example - - Fetch from the `GET Expense` endpoint and view a company's expense. - properties: - transaction_date: - type: optional - docs: When the transaction occurred. - account: - type: optional - docs: The expense's payment account. - contact: - type: optional - docs: The expense's contact. - total_amount: - type: optional - docs: The expense's total amount. - sub_total: - type: optional - docs: The expense's total amount before tax. - total_tax_amount: - type: optional - docs: The expense's total tax amount. - currency: - type: optional - docs: >- - The expense's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: optional - docs: The expense's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - inclusive_of_tax: - type: optional - docs: >- - If the transaction is inclusive or exclusive of tax. `True` if - inclusive, `False` if exclusive. - company: - type: optional - docs: The company the expense belongs to. - employee: - type: optional - docs: The employee this overall transaction relates to. - memo: - type: optional - docs: The expense's private note. - lines: optional> - tracking_categories: optional>> - accounting_period: - type: optional - docs: The accounting period that the Expense was generated in. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - ExpenseResponse: - properties: - model: Expense - warnings: list - errors: list - logs: optional> - source: - openapi: accounting_v3.yml - ExternalTargetFieldApi: - properties: - name: - type: optional - access: read-only - description: - type: optional - access: read-only - is_mapped: - type: optional - access: read-only - source: - openapi: accounting_v3.yml - ExternalTargetFieldApiResponse: - properties: - Account: optional> - AccountingAttachment: optional> - BalanceSheet: optional> - CashFlowStatement: optional> - CompanyInfo: optional> - Contact: optional> - IncomeStatement: optional> - CreditNote: optional> - Item: optional> - PurchaseOrder: optional> - TrackingCategory: optional> - JournalEntry: optional> - TaxRate: optional> - Invoice: optional> - Payment: optional> - Expense: optional> - VendorCredit: optional> - Transaction: optional> - AccountingPeriod: optional> - GeneralLedgerTransaction: optional> - BankFeedAccount: optional> - Employee: optional> - PaymentMethod: optional> - Project: optional> - PaymentTerm: optional> - source: - openapi: accounting_v3.yml - FeedStatusEnum: - enum: - - ACTIVE - - INACTIVE - docs: |- - * `ACTIVE` - ACTIVE - * `INACTIVE` - INACTIVE - source: - openapi: accounting_v3.yml - FieldFormatEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - docs: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - source: - openapi: accounting_v3.yml - FieldMappingApiInstanceTargetField: - properties: - name: string - description: string - is_organization_wide: boolean - source: - openapi: accounting_v3.yml - inline: true - FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: - properties: - method: optional - url_path: optional - field_traversal_path: optional> - source: - openapi: accounting_v3.yml - inline: true - FieldMappingApiInstanceRemoteField: - properties: - remote_key_name: optional - schema: optional> - remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - source: - openapi: accounting_v3.yml - inline: true - FieldMappingApiInstance: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - is_integration_wide: - type: optional - access: read-only - target_field: - type: optional - access: read-only - remote_field: - type: optional - access: read-only - source: - openapi: accounting_v3.yml - FieldMappingApiInstanceResponse: - properties: - Account: optional> - AccountingAttachment: optional> - BalanceSheet: optional> - CashFlowStatement: optional> - CompanyInfo: optional> - Contact: optional> - IncomeStatement: optional> - CreditNote: optional> - Item: optional> - PurchaseOrder: optional> - TrackingCategory: optional> - JournalEntry: optional> - TaxRate: optional> - Invoice: optional> - Payment: optional> - Expense: optional> - VendorCredit: optional> - Transaction: optional> - AccountingPeriod: optional> - GeneralLedgerTransaction: optional> - BankFeedAccount: optional> - Employee: optional> - PaymentMethod: optional> - Project: optional> - PaymentTerm: optional> - source: - openapi: accounting_v3.yml - FieldMappingInstanceResponse: - properties: - model: FieldMappingApiInstance - warnings: list - errors: list - logs: optional> - source: - openapi: accounting_v3.yml - FieldPermissionDeserializer: - properties: - enabled_fields: optional> - disabled_fields: optional> - source: - openapi: accounting_v3.yml - FieldPermissionDeserializerRequest: - properties: - enabled_fields: optional> - disabled_fields: optional> - source: - openapi: accounting_v3.yml - FieldTypeEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - docs: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - source: - openapi: accounting_v3.yml - GeneralLedgerTransactionUnderlyingTransactionType: - discriminated: false - docs: |- - The type of the underlying transaction. - - * `INVOICE` - INVOICE - * `EXPENSE` - EXPENSE - * `TRANSACTION` - TRANSACTION - * `JOURNAL_ENTRY` - JOURNAL_ENTRY - * `PAYMENT` - PAYMENT - * `VENDOR_CREDIT` - VENDOR_CREDIT - * `CREDIT_NOTE` - CREDIT_NOTE - union: - - UnderlyingTransactionTypeEnum - - string - source: - openapi: accounting_v3.yml - inline: true - GeneralLedgerTransactionAccountingPeriod: - discriminated: false - docs: The accounting period that the GeneralLedgerTransaction was generated in. - union: - - type: string - validation: - format: uuid - - AccountingPeriod - source: - openapi: accounting_v3.yml - inline: true - GeneralLedgerTransactionCompany: - discriminated: false - docs: The company the GeneralLedgerTransaction belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - GeneralLedgerTransactionTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - GeneralLedgerTransactionGeneralLedgerTransactionLinesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - GeneralLedgerTransactionLine - source: - openapi: accounting_v3.yml - inline: true - GeneralLedgerTransaction: - docs: >- - # The GeneralLedgerTransaction Object - - ### Description - - A General Ledger Entry is a record of a financial transaction that is - posted to the general ledger, the central repository of a company’s - financial data. - - - The `GeneralLedgerTransaction` object is a singular endpoint to pull all - transactions posted to a company’s general ledger. The transaction that - generated the `GeneralLedgerTransaction` can be found by referencing the - `underlying_transaction_type` and `underlying_transaction_remote_id` - fields. - - - The lines of a `GeneralLedgerTransaction` object will always have equal - amounts of debits and credits. - - - ### Usage Example - - Fetch from the `GET GeneralLedgerTransaction` endpoint and view a general - ledger transaction. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - underlying_transaction_remote_id: - type: optional - docs: The third party remote ID of the underlying transaction. - validation: - maxLength: 50 - underlying_transaction_type: - type: optional - docs: |- - The type of the underlying transaction. - - * `INVOICE` - INVOICE - * `EXPENSE` - EXPENSE - * `TRANSACTION` - TRANSACTION - * `JOURNAL_ENTRY` - JOURNAL_ENTRY - * `PAYMENT` - PAYMENT - * `VENDOR_CREDIT` - VENDOR_CREDIT - * `CREDIT_NOTE` - CREDIT_NOTE - accounting_period: - type: optional - docs: >- - The accounting period that the GeneralLedgerTransaction was generated - in. - company: - type: optional - docs: The company the GeneralLedgerTransaction belongs to. - remote_updated_at: - type: optional - docs: When the third party's GeneralLedgerTransaction entry was updated. - remote_created_at: - type: optional - docs: When the third party's GeneralLedgerTransaction entry was created. - tracking_categories: optional>> - posting_date: - type: optional - docs: The date that the transaction was posted to the general ledger. - general_ledger_transaction_lines: - type: >- - optional> - docs: A list of “General Ledger Transaction Applied to Lines” objects. - access: read-only - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - GeneralLedgerTransactionLineAccount: - discriminated: false - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - GeneralLedgerTransactionLineCompany: - discriminated: false - docs: The company the GeneralLedgerTransaction belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - GeneralLedgerTransactionLineEmployee: - discriminated: false - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: accounting_v3.yml - inline: true - GeneralLedgerTransactionLineContact: - discriminated: false - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - GeneralLedgerTransactionLineProject: - discriminated: false - union: - - type: string - validation: - format: uuid - - Project - source: - openapi: accounting_v3.yml - inline: true - GeneralLedgerTransactionLineTransactionCurrency: - discriminated: false - docs: >- - The transaction currency that the transaction is made in. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - GeneralLedgerTransactionLineTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - GeneralLedgerTransactionLineItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Item - source: - openapi: accounting_v3.yml - inline: true - GeneralLedgerTransactionLine: - docs: >- - # The GeneralLedgerTransactionLineSerializer Object - - ### Description - - The `GeneralLedgerTransactionLineSerializer` object represents general - ledger transaction line item. - - - ### Usage Example Fetch from the `GET - GeneralLedgerTransactionLineSerializer` endpoint and view an - - `GeneralLedgerTransaction` line item. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - account: optional - company: - type: optional - docs: The company the GeneralLedgerTransaction belongs to. - employee: optional - contact: optional - project: optional - base_currency: - type: optional - docs: >- - The base currency of the transaction - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - transaction_currency: - type: optional - docs: >- - The transaction currency that the transaction is made in. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: optional - docs: >- - The exchange rate between the base currency and the transaction - currency. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - description: - type: optional - docs: A description of the line item. - tracking_categories: - type: optional> - access: read-only - debit_amount: string - credit_amount: string - item: optional - foreign_debit_amount: string - foreign_credit_amount: string - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - IncomeStatementCurrency: - discriminated: false - docs: >- - The income statement's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - IncomeStatementCompany: - discriminated: false - docs: The company the income statement belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - IncomeStatement: - docs: >- - # The IncomeStatement Object - - ### Description - - The `IncomeStatement` object is used to represent a company’s income, the - cost of sales, operating expenses, and other non-operating expenses. The - object also includes other important values like gross profit, gross - operating profit, and net income. This represents a period of time (month, - quarter, or year). - - - ### Usage Example - - Fetch from the `GET IncomeStatement` endpoint and view a company's income - statement for a given period. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The income statement's name. - currency: - type: optional - docs: >- - The income statement's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - company: - type: optional - docs: The company the income statement belongs to. - start_period: - type: optional - docs: The income statement's start period. - end_period: - type: optional - docs: The income statement's end period. - income: - type: optional> - access: read-only - cost_of_sales: - type: optional> - access: read-only - gross_profit: - type: optional - docs: The revenue minus the cost of sale. - operating_expenses: - type: optional> - access: read-only - net_operating_income: - type: optional - docs: The revenue minus the operating expenses. - non_operating_expenses: - type: optional> - access: read-only - net_income: - type: optional - docs: The gross profit minus the total expenses. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - IndividualCommonModelScopeDeserializer: - properties: - model_name: string - model_permissions: optional> - field_permissions: optional - source: - openapi: accounting_v3.yml - IndividualCommonModelScopeDeserializerRequest: - properties: - model_name: - type: string - validation: - minLength: 1 - model_permissions: optional> - field_permissions: optional - source: - openapi: accounting_v3.yml - InvoiceContact: - discriminated: false - docs: The invoice's contact. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - InvoiceCompany: - discriminated: false - docs: The company the invoice belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - InvoiceEmployee: - discriminated: false - docs: The employee this overall transaction relates to. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: accounting_v3.yml - inline: true - InvoiceCurrency: - discriminated: false - docs: >- - The invoice's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - InvoicePaymentTerm: - discriminated: false - docs: The payment term that applies to this transaction. - union: - - type: string - validation: - format: uuid - - PaymentTerm - source: - openapi: accounting_v3.yml - inline: true - InvoiceStatus: - discriminated: false - docs: |- - The status of the invoice. - - * `PAID` - PAID - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `PARTIALLY_PAID` - PARTIALLY_PAID - * `OPEN` - OPEN - * `VOID` - VOID - union: - - InvoiceStatusEnum - - string - source: - openapi: accounting_v3.yml - inline: true - InvoiceTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - InvoiceAccountingPeriod: - discriminated: false - docs: The accounting period that the Invoice was generated in. - union: - - type: string - validation: - format: uuid - - AccountingPeriod - source: - openapi: accounting_v3.yml - inline: true - InvoicePurchaseOrdersItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - PurchaseOrder - source: - openapi: accounting_v3.yml - inline: true - InvoicePaymentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Payment - source: - openapi: accounting_v3.yml - inline: true - InvoiceAppliedPaymentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - PaymentLineItem - source: - openapi: accounting_v3.yml - inline: true - InvoiceAppliedCreditNotesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - CreditNoteApplyLineForInvoice - source: - openapi: accounting_v3.yml - inline: true - InvoiceAppliedVendorCreditsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - VendorCreditApplyLineForInvoice - source: - openapi: accounting_v3.yml - inline: true - Invoice: - docs: >- - # The Invoice Object - - ### Description - - The `Invoice` object represents an itemized record of goods and/or - services sold to a customer or bought from a vendor. - - - - Represents a Bill when the `Invoice` type is `ACCOUNTS_PAYABLE`. - References an Invoice when the `Invoice` type is `ACCOUNTS_RECEIVABLE`. - - - ### Usage Example - - Fetch from the `LIST Invoices` endpoint and view a company's invoices. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - type: - type: optional - docs: >- - Whether the invoice is an accounts receivable or accounts payable. If - `type` is `ACCOUNTS_PAYABLE`, the invoice is a bill. If `type` is - `ACCOUNTS_RECEIVABLE`, it is an invoice. - - - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - contact: - type: optional - docs: The invoice's contact. - number: - type: optional - docs: The invoice's number. - issue_date: - type: optional - docs: The invoice's issue date. - due_date: - type: optional - docs: The invoice's due date. - paid_on_date: - type: optional - docs: The invoice's paid date. - memo: - type: optional - docs: The invoice's private note. - company: - type: optional - docs: The company the invoice belongs to. - employee: - type: optional - docs: The employee this overall transaction relates to. - currency: - type: optional - docs: >- - The invoice's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: optional - docs: The invoice's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - payment_term: - type: optional - docs: The payment term that applies to this transaction. - total_discount: - type: optional - docs: The total discounts applied to the total cost. - sub_total: - type: optional - docs: The total amount being paid before taxes. - status: - type: optional - docs: |- - The status of the invoice. - - * `PAID` - PAID - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `PARTIALLY_PAID` - PARTIALLY_PAID - * `OPEN` - OPEN - * `VOID` - VOID - total_tax_amount: - type: optional - docs: The total amount being paid in taxes. - total_amount: - type: optional - docs: The invoice's total amount. - balance: - type: optional - docs: The invoice's remaining balance. - remote_updated_at: - type: optional - docs: When the third party's invoice entry was updated. - tracking_categories: optional>> - accounting_period: - type: optional - docs: The accounting period that the Invoice was generated in. - purchase_orders: optional>> - payments: - type: optional>> - docs: Array of `Payment` object IDs. - applied_payments: - type: optional>> - docs: >- - A list of the Payment Applied to Lines common models related to a - given Invoice, Credit Note, or Journal Entry. - line_items: - type: optional> - access: read-only - applied_credit_notes: - type: optional> - docs: '`CreditNoteApplyLines` applied to the Invoice.' - access: read-only - applied_vendor_credits: - type: optional> - docs: '`VendorCreditApplyLines` applied to the Invoice.' - access: read-only - inclusive_of_tax: - type: optional - docs: >- - If the transaction is inclusive or exclusive of tax. `True` if - inclusive, `False` if exclusive. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - InvoiceLineItemEmployee: - discriminated: false - docs: The employee this overall transaction relates to. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: accounting_v3.yml - inline: true - InvoiceLineItemProject: - discriminated: false - union: - - type: string - validation: - format: uuid - - Project - source: - openapi: accounting_v3.yml - inline: true - InvoiceLineItemContact: - discriminated: false - docs: The invoice's contact. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - InvoiceLineItemCurrency: - discriminated: false - docs: >- - The line item's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - InvoiceLineItemItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Item - source: - openapi: accounting_v3.yml - inline: true - InvoiceLineItemAccount: - discriminated: false - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - InvoiceLineItemTrackingCategory: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - InvoiceLineItemTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - InvoiceLineItem: - docs: >- - # The InvoiceLineItem Object - - ### Description - - The `InvoiceLineItem` object represents an itemized record of goods and/or - services sold to a customer. - - - ### Usage Example - - Fetch from the `GET Invoice` endpoint and view the invoice's line items. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - description: - type: optional - docs: The line item's description. - unit_price: - type: optional - docs: The line item's unit price. - quantity: - type: optional - docs: The line item's quantity. - total_amount: - type: optional - docs: The line item's total amount. - employee: - type: optional - docs: The employee this overall transaction relates to. - project: optional - contact: - type: optional - docs: The invoice's contact. - currency: - type: optional - docs: >- - The line item's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: optional - docs: The line item's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - item: optional - account: optional - tax_rate: - type: optional - docs: The tax rate that applies to this line item. - validation: - format: uuid - tracking_category: - type: optional - availability: deprecated - tracking_categories: - type: optional>> - docs: The invoice line item's associated tracking categories. - company: - type: optional - docs: The company the invoice belongs to. - validation: - format: uuid - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - InvoiceLineItemRequestEmployee: - discriminated: false - docs: The employee this overall transaction relates to. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: accounting_v3.yml - inline: true - InvoiceLineItemRequestProject: - discriminated: false - union: - - type: string - validation: - format: uuid - - Project - source: - openapi: accounting_v3.yml - inline: true - InvoiceLineItemRequestContact: - discriminated: false - docs: The invoice's contact. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - InvoiceLineItemRequestCurrency: - discriminated: false - docs: >- - The line item's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - InvoiceLineItemRequestItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Item - source: - openapi: accounting_v3.yml - inline: true - InvoiceLineItemRequestAccount: - discriminated: false - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - InvoiceLineItemRequestTrackingCategory: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - InvoiceLineItemRequestTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - InvoiceLineItemRequest: - docs: >- - # The InvoiceLineItem Object - - ### Description - - The `InvoiceLineItem` object represents an itemized record of goods and/or - services sold to a customer. - - - ### Usage Example - - Fetch from the `GET Invoice` endpoint and view the invoice's line items. - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - description: - type: optional - docs: The line item's description. - unit_price: - type: optional - docs: The line item's unit price. - quantity: - type: optional - docs: The line item's quantity. - total_amount: - type: optional - docs: The line item's total amount. - employee: - type: optional - docs: The employee this overall transaction relates to. - project: optional - contact: - type: optional - docs: The invoice's contact. - currency: - type: optional - docs: >- - The line item's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: optional - docs: The line item's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - item: optional - account: optional - tax_rate: - type: optional - docs: The tax rate that applies to this line item. - validation: - format: uuid - tracking_category: - type: optional - availability: deprecated - tracking_categories: - type: optional>> - docs: The invoice line item's associated tracking categories. - company: - type: optional - docs: The company the invoice belongs to. - validation: - format: uuid - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - InvoiceRequestType: - discriminated: false - docs: >- - Whether the invoice is an accounts receivable or accounts payable. If - `type` is `ACCOUNTS_PAYABLE`, the invoice is a bill. If `type` is - `ACCOUNTS_RECEIVABLE`, it is an invoice. - - - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - union: - - InvoiceTypeEnum - - string - source: - openapi: accounting_v3.yml - inline: true - InvoiceRequestContact: - discriminated: false - docs: The invoice's contact. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - InvoiceRequestEmployee: - discriminated: false - docs: The employee this overall transaction relates to. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: accounting_v3.yml - inline: true - InvoiceRequestStatus: - discriminated: false - docs: |- - The status of the invoice. - - * `PAID` - PAID - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `PARTIALLY_PAID` - PARTIALLY_PAID - * `OPEN` - OPEN - * `VOID` - VOID - union: - - InvoiceStatusEnum - - string - source: - openapi: accounting_v3.yml - inline: true - InvoiceRequestCompany: - discriminated: false - docs: The company the invoice belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - InvoiceRequestCurrency: - discriminated: false - docs: >- - The invoice's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - InvoiceRequestPaymentTerm: - discriminated: false - docs: The payment term that applies to this transaction. - union: - - type: string - validation: - format: uuid - - PaymentTerm - source: - openapi: accounting_v3.yml - inline: true - InvoiceRequestPaymentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Payment - source: - openapi: accounting_v3.yml - inline: true - InvoiceRequestTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - InvoiceRequestPurchaseOrdersItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - PurchaseOrder - source: - openapi: accounting_v3.yml - inline: true - InvoiceRequest: - docs: >- - # The Invoice Object - - ### Description - - The `Invoice` object represents an itemized record of goods and/or - services sold to a customer or bought from a vendor. - - - - Represents a Bill when the `Invoice` type is `ACCOUNTS_PAYABLE`. - References an Invoice when the `Invoice` type is `ACCOUNTS_RECEIVABLE`. - - - ### Usage Example - - Fetch from the `LIST Invoices` endpoint and view a company's invoices. - properties: - type: - type: optional - docs: >- - Whether the invoice is an accounts receivable or accounts payable. If - `type` is `ACCOUNTS_PAYABLE`, the invoice is a bill. If `type` is - `ACCOUNTS_RECEIVABLE`, it is an invoice. - - - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - contact: - type: optional - docs: The invoice's contact. - number: - type: optional - docs: The invoice's number. - issue_date: - type: optional - docs: The invoice's issue date. - due_date: - type: optional - docs: The invoice's due date. - paid_on_date: - type: optional - docs: The invoice's paid date. - employee: - type: optional - docs: The employee this overall transaction relates to. - memo: - type: optional - docs: The invoice's private note. - status: - type: optional - docs: |- - The status of the invoice. - - * `PAID` - PAID - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `PARTIALLY_PAID` - PARTIALLY_PAID - * `OPEN` - OPEN - * `VOID` - VOID - company: - type: optional - docs: The company the invoice belongs to. - currency: - type: optional - docs: >- - The invoice's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: optional - docs: The invoice's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - total_discount: - type: optional - docs: The total discounts applied to the total cost. - sub_total: - type: optional - docs: The total amount being paid before taxes. - payment_term: - type: optional - docs: The payment term that applies to this transaction. - total_tax_amount: - type: optional - docs: The total amount being paid in taxes. - inclusive_of_tax: - type: optional - docs: >- - If the transaction is inclusive or exclusive of tax. `True` if - inclusive, `False` if exclusive. - total_amount: - type: optional - docs: The invoice's total amount. - balance: - type: optional - docs: The invoice's remaining balance. - payments: - type: optional>> - docs: Array of `Payment` object IDs. - tracking_categories: optional>> - line_items: optional> - purchase_orders: optional>> - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - InvoiceResponse: - properties: - model: Invoice - warnings: list - errors: list - logs: optional> - source: - openapi: accounting_v3.yml - InvoiceStatusEnum: - enum: - - PAID - - DRAFT - - SUBMITTED - - PARTIALLY_PAID - - OPEN - - VOID - docs: |- - * `PAID` - PAID - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `PARTIALLY_PAID` - PARTIALLY_PAID - * `OPEN` - OPEN - * `VOID` - VOID - source: - openapi: accounting_v3.yml - InvoiceTypeEnum: - enum: - - ACCOUNTS_RECEIVABLE - - ACCOUNTS_PAYABLE - docs: |- - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - source: - openapi: accounting_v3.yml - IssueStatus: - discriminated: false - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - union: - - IssueStatusEnum - - string - source: - openapi: accounting_v3.yml - inline: true - Issue: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - status: - type: optional - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - error_description: string - end_user: - type: optional> - access: read-only - first_incident_time: optional - last_incident_time: optional - is_muted: - type: optional - access: read-only - error_details: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - IssueStatusEnum: - enum: - - ONGOING - - RESOLVED - docs: |- - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - source: - openapi: accounting_v3.yml - ItemStatus: - discriminated: false - docs: |- - The item's status. - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - union: - - Status7D1Enum - - string - source: - openapi: accounting_v3.yml - inline: true - ItemType: - discriminated: false - docs: |- - The item's type. - - * `INVENTORY` - INVENTORY - * `NON_INVENTORY` - NON_INVENTORY - * `SERVICE` - SERVICE - * `UNKNOWN` - UNKNOWN - union: - - Type2BbEnum - - string - source: - openapi: accounting_v3.yml - inline: true - ItemPurchaseAccount: - discriminated: false - docs: References the default account used to record a purchase of the item. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - ItemSalesAccount: - discriminated: false - docs: References the default account used to record a sale. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - ItemCompany: - discriminated: false - docs: The company the item belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - ItemPurchaseTaxRate: - discriminated: false - docs: The default purchase tax rate for this item. - union: - - type: string - validation: - format: uuid - - TaxRate - source: - openapi: accounting_v3.yml - inline: true - ItemSalesTaxRate: - discriminated: false - docs: The default sales tax rate for this item. - union: - - type: string - validation: - format: uuid - - TaxRate - source: - openapi: accounting_v3.yml - inline: true - Item: - docs: |- - # The Item Object - ### Description - The `Item` object refers to the goods involved in a transaction. - - ### Usage Example - Fetch from the `LIST Items` endpoint and view a company's items. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The item's name. - status: - type: optional - docs: |- - The item's status. - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - type: - type: optional - docs: |- - The item's type. - - * `INVENTORY` - INVENTORY - * `NON_INVENTORY` - NON_INVENTORY - * `SERVICE` - SERVICE - * `UNKNOWN` - UNKNOWN - unit_price: - type: optional - docs: The item's unit price. - purchase_price: - type: optional - docs: The price at which the item is purchased from a vendor. - purchase_account: - type: optional - docs: References the default account used to record a purchase of the item. - sales_account: - type: optional - docs: References the default account used to record a sale. - company: - type: optional - docs: The company the item belongs to. - purchase_tax_rate: - type: optional - docs: The default purchase tax rate for this item. - sales_tax_rate: - type: optional - docs: The default sales tax rate for this item. - remote_updated_at: - type: optional - docs: When the third party's item note was updated. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - ItemFormatEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - docs: |- - * `string` - uuid - * `number` - url - * `date` - email - * `datetime` - phone - * `bool` - currency - * `list` - decimal - source: - openapi: accounting_v3.yml - ItemRequestRequestStatus: - discriminated: false - docs: |- - The item's status. - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - union: - - Status7D1Enum - - string - source: - openapi: accounting_v3.yml - inline: true - ItemRequestRequestType: - discriminated: false - docs: |- - The item's type. - - * `INVENTORY` - INVENTORY - * `NON_INVENTORY` - NON_INVENTORY - * `SERVICE` - SERVICE - * `UNKNOWN` - UNKNOWN - union: - - Type2BbEnum - - string - source: - openapi: accounting_v3.yml - inline: true - ItemRequestRequestPurchaseAccount: - discriminated: false - docs: References the default account used to record a purchase of the item. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - ItemRequestRequestSalesAccount: - discriminated: false - docs: References the default account used to record a sale. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - ItemRequestRequestCompany: - discriminated: false - docs: The company the item belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - ItemRequestRequestPurchaseTaxRate: - discriminated: false - docs: The default purchase tax rate for this item. - union: - - type: string - validation: - format: uuid - - TaxRate - source: - openapi: accounting_v3.yml - inline: true - ItemRequestRequestSalesTaxRate: - discriminated: false - docs: The default sales tax rate for this item. - union: - - type: string - validation: - format: uuid - - TaxRate - source: - openapi: accounting_v3.yml - inline: true - ItemRequestRequest: - docs: |- - # The Item Object - ### Description - The `Item` object refers to the goods involved in a transaction. - - ### Usage Example - Fetch from the `LIST Items` endpoint and view a company's items. - properties: - name: - type: optional - docs: The item's name. - status: - type: optional - docs: |- - The item's status. - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - type: - type: optional - docs: |- - The item's type. - - * `INVENTORY` - INVENTORY - * `NON_INVENTORY` - NON_INVENTORY - * `SERVICE` - SERVICE - * `UNKNOWN` - UNKNOWN - unit_price: - type: optional - docs: The item's unit price. - purchase_price: - type: optional - docs: The price at which the item is purchased from a vendor. - purchase_account: - type: optional - docs: References the default account used to record a purchase of the item. - sales_account: - type: optional - docs: References the default account used to record a sale. - company: - type: optional - docs: The company the item belongs to. - purchase_tax_rate: - type: optional - docs: The default purchase tax rate for this item. - sales_tax_rate: - type: optional - docs: The default sales tax rate for this item. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - ItemResponse: - properties: - model: Item - warnings: list - errors: list - logs: optional> - source: - openapi: accounting_v3.yml - ItemSchema: - properties: - item_type: optional - item_format: optional - item_choices: optional> - source: - openapi: accounting_v3.yml - ItemTypeEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - docs: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - source: - openapi: accounting_v3.yml - JournalEntryPaymentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Payment - source: - openapi: accounting_v3.yml - inline: true - JournalEntryAppliedPaymentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - PaymentLineItem - source: - openapi: accounting_v3.yml - inline: true - JournalEntryCurrency: - discriminated: false - docs: >- - The journal's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - JournalEntryCompany: - discriminated: false - docs: The company the journal entry belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - JournalEntryTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - JournalEntryPostingStatus: - discriminated: false - docs: |- - The journal's posting status. - - * `UNPOSTED` - UNPOSTED - * `POSTED` - POSTED - union: - - PostingStatusEnum - - string - source: - openapi: accounting_v3.yml - inline: true - JournalEntryAccountingPeriod: - discriminated: false - docs: The accounting period that the JournalEntry was generated in. - union: - - type: string - validation: - format: uuid - - AccountingPeriod - source: - openapi: accounting_v3.yml - inline: true - JournalEntry: - docs: >- - # The JournalEntry Object - - ### Description - - A `JournalEntry` is a record of a transaction or event that is entered - into a company's accounting system. - - - The `JournalEntry` common model contains records that are automatically - created as a result of a certain type of transaction, like an Invoice, and - records that are manually created against a company’s ledger. - - - The lines of a given `JournalEntry` object should always sum to 0. A - positive `net_amount` means the line represents a debit and a negative - net_amount represents a credit. - - - ### Usage Example - - Fetch from the `GET JournalEntry` endpoint and view a company's journey - entry. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - transaction_date: - type: optional - docs: The journal entry's transaction date. - payments: - type: optional>> - docs: Array of `Payment` object IDs. - applied_payments: - type: optional>> - docs: >- - A list of the Payment Applied to Lines common models related to a - given Invoice, Credit Note, or Journal Entry. - memo: - type: optional - docs: The journal entry's private note. - currency: - type: optional - docs: >- - The journal's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: optional - docs: The journal entry's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - company: - type: optional - docs: The company the journal entry belongs to. - inclusive_of_tax: - type: optional - docs: >- - If the transaction is inclusive or exclusive of tax. `True` if - inclusive, `False` if exclusive. - lines: - type: optional> - access: read-only - journal_number: - type: optional - docs: Reference number for identifying journal entries. - validation: - maxLength: 70 - tracking_categories: optional>> - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - posting_status: - type: optional - docs: |- - The journal's posting status. - - * `UNPOSTED` - UNPOSTED - * `POSTED` - POSTED - accounting_period: - type: optional - docs: The accounting period that the JournalEntry was generated in. - remote_created_at: - type: optional - docs: When the third party's journal entry was created. - remote_updated_at: - type: optional - docs: When the third party's journal entry was updated. - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - JournalEntryRequestPaymentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Payment - source: - openapi: accounting_v3.yml - inline: true - JournalEntryRequestCurrency: - discriminated: false - docs: >- - The journal's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - JournalEntryRequestCompany: - discriminated: false - docs: The company the journal entry belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - JournalEntryRequestTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - JournalEntryRequestPostingStatus: - discriminated: false - docs: |- - The journal's posting status. - - * `UNPOSTED` - UNPOSTED - * `POSTED` - POSTED - union: - - PostingStatusEnum - - string - source: - openapi: accounting_v3.yml - inline: true - JournalEntryRequest: - docs: >- - # The JournalEntry Object - - ### Description - - The `JournalEntry` object is used to get a record of all manually created - entries made in a company’s general ledger. The journal line items for - each journal entry should sum to zero. - - - ### Usage Example - - Fetch from the `GET JournalEntry` endpoint and view a company's journey - entry. - properties: - transaction_date: - type: optional - docs: The journal entry's transaction date. - payments: - type: optional>> - docs: Array of `Payment` object IDs. - memo: - type: optional - docs: The journal entry's private note. - currency: - type: optional - docs: >- - The journal's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: optional - docs: The journal entry's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - company: - type: optional - docs: The company the journal entry belongs to. - tracking_categories: optional>> - inclusive_of_tax: - type: optional - docs: >- - If the transaction is inclusive or exclusive of tax. `True` if - inclusive, `False` if exclusive. - lines: optional> - journal_number: - type: optional - docs: Reference number for identifying journal entries. - validation: - maxLength: 70 - posting_status: - type: optional - docs: |- - The journal's posting status. - - * `UNPOSTED` - UNPOSTED - * `POSTED` - POSTED - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - JournalEntryResponse: - properties: - model: JournalEntry - warnings: list - errors: list - logs: optional> - source: - openapi: accounting_v3.yml - JournalLineAccount: - discriminated: false - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - JournalLineTrackingCategory: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - JournalLineTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - JournalLineCurrency: - discriminated: false - docs: >- - The journal line item's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - JournalLineProject: - discriminated: false - union: - - type: string - validation: - format: uuid - - Project - source: - openapi: accounting_v3.yml - inline: true - JournalLine: - docs: >- - # The JournalLine Object - - ### Description - - The `JournalLine` object is used to represent a journal entry's line - items. - - - ### Usage Example - - Fetch from the `GET JournalEntry` endpoint and view the journal entry's - line items. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - account: optional - net_amount: - type: optional - docs: The value of the line item including taxes and other fees. - tracking_category: - type: optional - availability: deprecated - tracking_categories: - type: optional>> - docs: The journal line item's associated tracking categories. - currency: - type: optional - docs: >- - The journal line item's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - company: - type: optional - docs: The company the journal entry belongs to. - validation: - format: uuid - employee: - type: optional - validation: - format: uuid - project: optional - contact: - type: optional - validation: - format: uuid - tax_rate: - type: optional - docs: The tax rate that applies to this line item. - validation: - format: uuid - description: - type: optional - docs: The line's description. - exchange_rate: - type: optional - docs: The journal line item's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - JournalLineRequestAccount: - discriminated: false - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - JournalLineRequestTrackingCategory: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - JournalLineRequestTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - JournalLineRequestCurrency: - discriminated: false - docs: >- - The journal line item's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - JournalLineRequestProject: - discriminated: false - union: - - type: string - validation: - format: uuid - - Project - source: - openapi: accounting_v3.yml - inline: true - JournalLineRequest: - docs: >- - # The JournalLine Object - - ### Description - - The `JournalLine` object is used to represent a journal entry's line - items. - - - ### Usage Example - - Fetch from the `GET JournalEntry` endpoint and view the journal entry's - line items. - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - account: optional - net_amount: - type: optional - docs: The value of the line item including taxes and other fees. - tracking_category: - type: optional - availability: deprecated - tracking_categories: - type: optional>> - docs: The journal line item's associated tracking categories. - currency: - type: optional - docs: >- - The journal line item's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - company: - type: optional - docs: The company the journal entry belongs to. - validation: - format: uuid - employee: - type: optional - validation: - format: uuid - project: optional - contact: - type: optional - validation: - format: uuid - tax_rate: - type: optional - docs: The tax rate that applies to this line item. - validation: - format: uuid - description: - type: optional - docs: The line's description. - exchange_rate: - type: optional - docs: The journal line item's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - LanguageEnum: - enum: - - en - - de - docs: |- - * `en` - en - * `de` - de - source: - openapi: accounting_v3.yml - LastSyncResultEnum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - docs: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - source: - openapi: accounting_v3.yml - LinkToken: - properties: - link_token: string - integration_name: optional - magic_link_url: optional - source: - openapi: accounting_v3.yml - LinkedAccountStatus: - properties: - linked_account_status: string - can_make_request: boolean - source: - openapi: accounting_v3.yml - MetaResponse: - properties: - request_schema: map - remote_field_classes: optional> - status: optional - has_conditional_params: boolean - has_required_linked_account_params: boolean - source: - openapi: accounting_v3.yml - MethodEnum: - enum: - - GET - - OPTIONS - - HEAD - - POST - - PUT - - PATCH - - DELETE - docs: |- - * `GET` - GET - * `OPTIONS` - OPTIONS - * `HEAD` - HEAD - * `POST` - POST - * `PUT` - PUT - * `PATCH` - PATCH - * `DELETE` - DELETE - source: - openapi: accounting_v3.yml - MethodTypeEnum: - enum: - - CREDIT_CARD - - DEBIT_CARD - - ACH - - CASH - - CHECK - docs: |- - * `CREDIT_CARD` - CREDIT_CARD - * `DEBIT_CARD` - DEBIT_CARD - * `ACH` - ACH - * `CASH` - CASH - * `CHECK` - CHECK - source: - openapi: accounting_v3.yml - ModelOperation: - docs: >- - # The ModelOperation Object - - ### Description - - The `ModelOperation` object is used to represent the operations that are - currently supported for a given model. - - - ### Usage Example - - View what operations are supported for the `Candidate` endpoint. - properties: - model_name: string - available_operations: list - required_post_parameters: list - supported_fields: list - source: - openapi: accounting_v3.yml - ModelPermissionDeserializer: - properties: - is_enabled: optional - source: - openapi: accounting_v3.yml - ModelPermissionDeserializerRequest: - properties: - is_enabled: optional - source: - openapi: accounting_v3.yml - MultipartFormFieldRequest: - docs: >- - # The MultipartFormField Object - - ### Description - - The `MultipartFormField` object is used to represent fields in an HTTP - request using `multipart/form-data`. - - - ### Usage Example - - Create a `MultipartFormField` to define a multipart form entry. - properties: - name: - type: string - docs: The name of the form field - validation: - minLength: 1 - data: - type: string - docs: The data for the form field. - validation: - minLength: 1 - encoding: - type: optional - docs: |- - The encoding of the value of `data`. Defaults to `RAW` if not defined. - - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - file_name: - type: optional - docs: The file name of the form field, if the field is for a file. - validation: - minLength: 1 - content_type: - type: optional - docs: The MIME type of the file, if the field is for a file. - validation: - minLength: 1 - source: - openapi: accounting_v3.yml - PaginatedAccountDetailsAndActionsList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedAccountList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedAccountingAttachmentList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedAccountingPeriodList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedAuditLogEventList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedBalanceSheetList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedBankFeedAccountList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedBankFeedTransactionList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedCashFlowStatementList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedCompanyInfoList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedContactList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedCreditNoteList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedEmployeeList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedExpenseList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedGeneralLedgerTransactionList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedIncomeStatementList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedInvoiceList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedIssueList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedItemList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedJournalEntryList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedPaymentList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedPaymentMethodList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedPaymentTermList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedProjectList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedPurchaseOrderList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedRemoteFieldClassList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedSyncStatusList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedTaxRateList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedTrackingCategoryList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedTransactionList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PaginatedVendorCreditList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: accounting_v3.yml - PatchedItemRequestRequestStatus: - discriminated: false - docs: |- - The item's status. - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - union: - - Status7D1Enum - - string - source: - openapi: accounting_v3.yml - inline: true - PatchedItemRequestRequestType: - discriminated: false - docs: |- - The item's type. - - * `INVENTORY` - INVENTORY - * `NON_INVENTORY` - NON_INVENTORY - * `SERVICE` - SERVICE - * `UNKNOWN` - UNKNOWN - union: - - Type2BbEnum - - string - source: - openapi: accounting_v3.yml - inline: true - PatchedItemRequestRequest: - docs: |- - # The Item Object - ### Description - The `Item` object refers to the goods involved in a transaction. - - ### Usage Example - Fetch from the `LIST Items` endpoint and view a company's items. - properties: - name: - type: optional - docs: The item's name. - status: - type: optional - docs: |- - The item's status. - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - type: - type: optional - docs: |- - The item's type. - - * `INVENTORY` - INVENTORY - * `NON_INVENTORY` - NON_INVENTORY - * `SERVICE` - SERVICE - * `UNKNOWN` - UNKNOWN - unit_price: - type: optional - docs: The item's unit price. - purchase_price: - type: optional - docs: The price at which the item is purchased from a vendor. - purchase_account: - type: optional - docs: References the default account used to record a purchase of the item. - validation: - format: uuid - sales_account: - type: optional - docs: References the default account used to record a sale. - validation: - format: uuid - company: - type: optional - docs: The company the item belongs to. - validation: - format: uuid - purchase_tax_rate: - type: optional - docs: The default purchase tax rate for this item. - validation: - format: uuid - sales_tax_rate: - type: optional - docs: The default sales tax rate for this item. - validation: - format: uuid - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - PatchedPaymentRequestContact: - discriminated: false - docs: The supplier, or customer involved in the payment. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - PatchedPaymentRequestAccount: - discriminated: false - docs: The supplier’s or customer’s account in which the payment is made. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - PatchedPaymentRequestPaymentMethod: - discriminated: false - docs: The method which this payment was made by. - union: - - type: string - validation: - format: uuid - - PaymentMethod - source: - openapi: accounting_v3.yml - inline: true - PatchedPaymentRequestCurrency: - discriminated: false - docs: >- - The payment's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - PatchedPaymentRequestCompany: - discriminated: false - docs: The company the payment belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - PatchedPaymentRequestType: - discriminated: false - docs: |- - The type of the invoice. - - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - union: - - PaymentTypeEnum - - string - source: - openapi: accounting_v3.yml - inline: true - PatchedPaymentRequestTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - PatchedPaymentRequestAccountingPeriod: - discriminated: false - docs: The accounting period that the Payment was generated in. - union: - - type: string - validation: - format: uuid - - AccountingPeriod - source: - openapi: accounting_v3.yml - inline: true - PatchedPaymentRequestAppliedToLinesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - PaymentLineItemRequest - source: - openapi: accounting_v3.yml - inline: true - PatchedPaymentRequest: - docs: >- - # The Payment Object - - ### Description - - The `Payment` object represents general payments made towards a specific - transaction. - - - ### Usage Example - - Fetch from the `GET Payment` endpoint and view an invoice's payment. - properties: - transaction_date: - type: optional - docs: The payment's transaction date. - contact: - type: optional - docs: The supplier, or customer involved in the payment. - account: - type: optional - docs: The supplier’s or customer’s account in which the payment is made. - payment_method: - type: optional - docs: The method which this payment was made by. - currency: - type: optional - docs: >- - The payment's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: optional - docs: The payment's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - company: - type: optional - docs: The company the payment belongs to. - total_amount: - type: optional - docs: >- - The total amount of money being paid to the supplier, or customer, - after taxes. - type: - type: optional - docs: |- - The type of the invoice. - - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - tracking_categories: optional>> - accounting_period: - type: optional - docs: The accounting period that the Payment was generated in. - applied_to_lines: - type: optional> - docs: A list of “Payment Applied to Lines” objects. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - PaymentContact: - discriminated: false - docs: The supplier, or customer involved in the payment. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - PaymentAccount: - discriminated: false - docs: The supplier’s or customer’s account in which the payment is made. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - PaymentPaymentMethod: - discriminated: false - docs: The method which this payment was made by. - union: - - type: string - validation: - format: uuid - - PaymentMethod - source: - openapi: accounting_v3.yml - inline: true - PaymentCurrency: - discriminated: false - docs: >- - The payment's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - PaymentCompany: - discriminated: false - docs: The company the payment belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - PaymentType: - discriminated: false - docs: |- - The type of the invoice. - - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - union: - - PaymentTypeEnum - - string - source: - openapi: accounting_v3.yml - inline: true - PaymentTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - PaymentAccountingPeriod: - discriminated: false - docs: The accounting period that the Payment was generated in. - union: - - type: string - validation: - format: uuid - - AccountingPeriod - source: - openapi: accounting_v3.yml - inline: true - PaymentAppliedToLinesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - PaymentLineItem - source: - openapi: accounting_v3.yml - inline: true - Payment: - docs: >- - # The Payment Object - - ### Description - - The `Payment` object represents general payments made towards a specific - transaction. - - - ### Usage Example - - Fetch from the `GET Payment` endpoint and view an invoice's payment. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - transaction_date: - type: optional - docs: The payment's transaction date. - contact: - type: optional - docs: The supplier, or customer involved in the payment. - account: - type: optional - docs: The supplier’s or customer’s account in which the payment is made. - payment_method: - type: optional - docs: The method which this payment was made by. - currency: - type: optional - docs: >- - The payment's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: optional - docs: The payment's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - company: - type: optional - docs: The company the payment belongs to. - total_amount: - type: optional - docs: >- - The total amount of money being paid to the supplier, or customer, - after taxes. - type: - type: optional - docs: |- - The type of the invoice. - - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - tracking_categories: optional>> - accounting_period: - type: optional - docs: The accounting period that the Payment was generated in. - applied_to_lines: - type: optional> - docs: A list of “Payment Applied to Lines” objects. - remote_updated_at: - type: optional - docs: When the third party's payment entry was updated. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - PaymentLineItem: - docs: >- - # The PaymentLineItem Object - - ### Description - - The `PaymentLineItem` object is an applied-to-line on a `Payment` that can - either be a `Invoice`, `CreditNote`, or `JournalEntry`. - - - ### Usage Example - - `Payment` will have a field called `applied-to-lines` which will be an - array of `PaymentLineItemInternalMappingSerializer` objects that can - either be a `Invoice`, `CreditNote`, or `JournalEntry`. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - applied_amount: - type: optional - docs: The amount being applied to the transaction. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - applied_date: - type: optional - docs: The date the payment portion is applied. - related_object_id: - type: optional - docs: >- - The Merge ID of the transaction the payment portion is being applied - to. - validation: - format: uuid - related_object_type: - type: optional - docs: >- - The type of transaction the payment portion is being applied to. - Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE. - source: - openapi: accounting_v3.yml - PaymentLineItemRequest: - docs: >- - # The PaymentLineItem Object - - ### Description - - The `PaymentLineItem` object is an applied-to-line on a `Payment` that can - either be a `Invoice`, `CreditNote`, or `JournalEntry`. - - - ### Usage Example - - `Payment` will have a field called `applied-to-lines` which will be an - array of `PaymentLineItemInternalMappingSerializer` objects that can - either be a `Invoice`, `CreditNote`, or `JournalEntry`. - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - applied_amount: - type: optional - docs: The amount being applied to the transaction. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - applied_date: - type: optional - docs: The date the payment portion is applied. - related_object_id: - type: optional - docs: >- - The Merge ID of the transaction the payment portion is being applied - to. - validation: - format: uuid - related_object_type: - type: optional - docs: >- - The type of transaction the payment portion is being applied to. - Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE. - validation: - minLength: 1 - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - PaymentMethodMethodType: - discriminated: false - docs: |- - The type of the payment method. - - * `CREDIT_CARD` - CREDIT_CARD - * `DEBIT_CARD` - DEBIT_CARD - * `ACH` - ACH - * `CASH` - CASH - * `CHECK` - CHECK - union: - - MethodTypeEnum - - string - source: - openapi: accounting_v3.yml - inline: true - PaymentMethod: - docs: >- - # The PaymentMethod Object - - ### Description - - The `PaymentMethod` object defines how a payment against an invoice is - made. - - - ### Usage Example - - Fetch from the `GET PaymentMethod` endpoint and view payment method - information. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - method_type: - type: PaymentMethodMethodType - docs: |- - The type of the payment method. - - * `CREDIT_CARD` - CREDIT_CARD - * `DEBIT_CARD` - DEBIT_CARD - * `ACH` - ACH - * `CASH` - CASH - * `CHECK` - CHECK - name: - type: string - docs: The payment method’s name - validation: - maxLength: 255 - is_active: - type: optional - docs: '`True` if the payment method is active, `False` if not.' - remote_updated_at: - type: optional - docs: When the third party's payment method was updated. - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - PaymentRequestContact: - discriminated: false - docs: The supplier, or customer involved in the payment. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - PaymentRequestAccount: - discriminated: false - docs: The supplier’s or customer’s account in which the payment is made. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - PaymentRequestPaymentMethod: - discriminated: false - docs: The method which this payment was made by. - union: - - type: string - validation: - format: uuid - - PaymentMethod - source: - openapi: accounting_v3.yml - inline: true - PaymentRequestCurrency: - discriminated: false - docs: >- - The payment's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - PaymentRequestCompany: - discriminated: false - docs: The company the payment belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - PaymentRequestType: - discriminated: false - docs: |- - The type of the invoice. - - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - union: - - PaymentTypeEnum - - string - source: - openapi: accounting_v3.yml - inline: true - PaymentRequestTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - PaymentRequestAccountingPeriod: - discriminated: false - docs: The accounting period that the Payment was generated in. - union: - - type: string - validation: - format: uuid - - AccountingPeriod - source: - openapi: accounting_v3.yml - inline: true - PaymentRequestAppliedToLinesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - PaymentLineItemRequest - source: - openapi: accounting_v3.yml - inline: true - PaymentRequest: - docs: >- - # The Payment Object - - ### Description - - The `Payment` object represents general payments made towards a specific - transaction. - - - ### Usage Example - - Fetch from the `GET Payment` endpoint and view an invoice's payment. - properties: - transaction_date: - type: optional - docs: The payment's transaction date. - contact: - type: optional - docs: The supplier, or customer involved in the payment. - account: - type: optional - docs: The supplier’s or customer’s account in which the payment is made. - payment_method: - type: optional - docs: The method which this payment was made by. - currency: - type: optional - docs: >- - The payment's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: optional - docs: The payment's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - company: - type: optional - docs: The company the payment belongs to. - total_amount: - type: optional - docs: >- - The total amount of money being paid to the supplier, or customer, - after taxes. - type: - type: optional - docs: |- - The type of the invoice. - - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - tracking_categories: optional>> - accounting_period: - type: optional - docs: The accounting period that the Payment was generated in. - applied_to_lines: - type: optional> - docs: A list of “Payment Applied to Lines” objects. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - PaymentResponse: - properties: - model: Payment - warnings: list - errors: list - logs: optional> - source: - openapi: accounting_v3.yml - PaymentTermCompany: - discriminated: false - docs: The subsidiary that the payment term belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - PaymentTerm: - docs: >- - # The PaymentTerm Object - - ### Description - - The `PaymentTerm` object is the agreed-upon conditions between a buyer and - a seller that define the timing, - - amount, and conditions under which payment for goods or services must be - made. - - - ### Usage Example - - Fetch from the `GET PaymentTerm` endpoint and view payment term - information. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: string - docs: The name of the payment term. - validation: - maxLength: 255 - is_active: - type: optional - docs: '`True` if the payment term is active, `False` if not.' - company: - type: optional - docs: The subsidiary that the payment term belongs to. - days_until_due: - type: optional - docs: The number of days after the invoice date that payment is due. - validation: - min: -2147483648 - max: 2147483647 - discount_days: - type: optional - docs: The number of days the invoice must be paid before discounts expire. - validation: - min: -2147483648 - max: 2147483647 - remote_last_modified_at: - type: optional - docs: When the third party's payment term was modified. - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - PaymentTypeEnum: - enum: - - ACCOUNTS_PAYABLE - - ACCOUNTS_RECEIVABLE - docs: |- - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - source: - openapi: accounting_v3.yml - PostingStatusEnum: - enum: - - UNPOSTED - - POSTED - docs: |- - * `UNPOSTED` - UNPOSTED - * `POSTED` - POSTED - source: - openapi: accounting_v3.yml - ProjectCompany: - discriminated: false - docs: The subsidiary that the project belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - ProjectContact: - discriminated: false - docs: The supplier, or customer involved in the project. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - Project: - docs: >- - # The Project Object - - ### Description - - The `Project` object is used to track and manage time, costs, resources, - and revenue for specific initiatives or work efforts. - - It provides classification on transactions for allocating expenses, - revenue, and activities to a specific project for financial reporting. - - - ### Usage Example - - Fetch from the `GET Project` endpoint and view project information. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: string - docs: The project’s name - validation: - maxLength: 255 - is_active: - type: optional - docs: '`True` if the project is active, `False` if the project is not active.' - company: - type: optional - docs: The subsidiary that the project belongs to. - contact: - type: optional - docs: The supplier, or customer involved in the project. - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - PurchaseOrderStatus: - discriminated: false - docs: |- - The purchase order's status. - - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `AUTHORIZED` - AUTHORIZED - * `BILLED` - BILLED - * `DELETED` - DELETED - union: - - PurchaseOrderStatusEnum - - string - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderDeliveryAddress: - discriminated: false - docs: The purchase order's delivery address. - union: - - type: string - validation: - format: uuid - - Address - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderVendor: - discriminated: false - docs: The party fulfilling the purchase order. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderCompany: - discriminated: false - docs: The company the purchase order belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderCurrency: - discriminated: false - docs: >- - The purchase order's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderPaymentTerm: - discriminated: false - docs: The payment term that applies to this transaction. - union: - - type: string - validation: - format: uuid - - PaymentTerm - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderAccountingPeriod: - discriminated: false - docs: The accounting period that the PurchaseOrder was generated in. - union: - - type: string - validation: - format: uuid - - AccountingPeriod - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrder: - docs: >- - # The PurchaseOrder Object - - ### Description - - A `PurchaseOrder` represents a request to purchase goods or services from - a vendor. It outlines the details of the purchase, such as the items or - services requested, quantities, prices, and delivery details. - - - A `PurchaseOrder` is a crucial component of the procurement process, but - does not typically result in any impact on the company’s general ledger. - The general ledger is typically only affected when the `PurchaseOrder` is - fulfilled as an *Accounts Payable* `Invoice` object (also known as a - Bill). - - - ### Usage Example - - Fetch from the `LIST PurchaseOrders` endpoint and view a company's - purchase orders. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - status: - type: optional - docs: |- - The purchase order's status. - - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `AUTHORIZED` - AUTHORIZED - * `BILLED` - BILLED - * `DELETED` - DELETED - issue_date: - type: optional - docs: The purchase order's issue date. - purchase_order_number: - type: optional - docs: The human-readable number of the purchase order. - validation: - maxLength: 100 - delivery_date: - type: optional - docs: The purchase order's delivery date. - delivery_address: - type: optional - docs: The purchase order's delivery address. - customer: - type: optional - docs: The contact making the purchase order. - validation: - format: uuid - vendor: - type: optional - docs: The party fulfilling the purchase order. - memo: - type: optional - docs: A memo attached to the purchase order. - company: - type: optional - docs: The company the purchase order belongs to. - total_amount: - type: optional - docs: The purchase order's total amount. - currency: - type: optional - docs: >- - The purchase order's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: optional - docs: The purchase order's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - payment_term: - type: optional - docs: The payment term that applies to this transaction. - line_items: - type: optional> - access: read-only - inclusive_of_tax: - type: optional - docs: >- - If the transaction is inclusive or exclusive of tax. `True` if - inclusive, `False` if exclusive. - tracking_categories: optional>> - accounting_period: - type: optional - docs: The accounting period that the PurchaseOrder was generated in. - remote_created_at: - type: optional - docs: When the third party's purchase order note was created. - remote_updated_at: - type: optional - docs: When the third party's purchase order note was updated. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - PurchaseOrderLineItemItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Item - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderLineItemCurrency: - discriminated: false - docs: >- - The purchase order line item's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderLineItem: - docs: >- - # The PurchaseOrderLineItem Object - - ### Description - - The `PurchaseOrderLineItem` object is used to represent a purchase order's - line item. - - - ### Usage Example - - Fetch from the `GET PurchaseOrder` endpoint and view a company's purchase - orders. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - description: - type: optional - docs: A description of the good being purchased. - unit_price: - type: optional - docs: The line item's unit price. - quantity: - type: optional - docs: The line item's quantity. - item: optional - account: - type: optional - docs: The purchase order line item's account. - validation: - format: uuid - tracking_category: - type: optional - docs: The purchase order line item's associated tracking category. - validation: - format: uuid - availability: deprecated - tracking_categories: - type: optional>> - docs: The purchase order line item's associated tracking categories. - tax_amount: - type: optional - docs: The purchase order line item's tax amount. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - total_line_amount: - type: optional - docs: The purchase order line item's total amount. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - currency: - type: optional - docs: >- - The purchase order line item's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - tax_rate: - type: optional - docs: The tax rate that applies to this line item. - validation: - format: uuid - exchange_rate: - type: optional - docs: The purchase order line item's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - company: - type: optional - docs: The company the purchase order line item belongs to. - validation: - format: uuid - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - PurchaseOrderLineItemRequestItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Item - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderLineItemRequestCurrency: - discriminated: false - docs: >- - The purchase order line item's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderLineItemRequest: - docs: >- - # The PurchaseOrderLineItem Object - - ### Description - - The `PurchaseOrderLineItem` object is used to represent a purchase order's - line item. - - - ### Usage Example - - Fetch from the `GET PurchaseOrder` endpoint and view a company's purchase - orders. - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - description: - type: optional - docs: A description of the good being purchased. - unit_price: - type: optional - docs: The line item's unit price. - quantity: - type: optional - docs: The line item's quantity. - item: optional - account: - type: optional - docs: The purchase order line item's account. - validation: - format: uuid - tracking_category: - type: optional - docs: The purchase order line item's associated tracking category. - validation: - format: uuid - availability: deprecated - tracking_categories: - type: optional>> - docs: The purchase order line item's associated tracking categories. - tax_amount: - type: optional - docs: The purchase order line item's tax amount. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - total_line_amount: - type: optional - docs: The purchase order line item's total amount. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - currency: - type: optional - docs: >- - The purchase order line item's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - tax_rate: - type: optional - docs: The tax rate that applies to this line item. - validation: - format: uuid - exchange_rate: - type: optional - docs: The purchase order line item's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - company: - type: optional - docs: The company the purchase order line item belongs to. - validation: - format: uuid - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - PurchaseOrderRequestStatus: - discriminated: false - docs: |- - The purchase order's status. - - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `AUTHORIZED` - AUTHORIZED - * `BILLED` - BILLED - * `DELETED` - DELETED - union: - - PurchaseOrderStatusEnum - - string - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderRequestDeliveryAddress: - discriminated: false - docs: The purchase order's delivery address. - union: - - type: string - validation: - format: uuid - - Address - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderRequestVendor: - discriminated: false - docs: The party fulfilling the purchase order. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderRequestCompany: - discriminated: false - docs: The company the purchase order belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderRequestPaymentTerm: - discriminated: false - docs: The payment term that applies to this transaction. - union: - - type: string - validation: - format: uuid - - PaymentTerm - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderRequestCurrency: - discriminated: false - docs: >- - The purchase order's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderRequestTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - PurchaseOrderRequest: - docs: >- - # The PurchaseOrder Object - - ### Description - - The `PurchaseOrder` object is a record of request for a product or service - between a buyer and seller. - - - ### Usage Example - - Fetch from the `LIST PurchaseOrders` endpoint and view a company's - purchase orders. - properties: - status: - type: optional - docs: |- - The purchase order's status. - - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `AUTHORIZED` - AUTHORIZED - * `BILLED` - BILLED - * `DELETED` - DELETED - issue_date: - type: optional - docs: The purchase order's issue date. - delivery_date: - type: optional - docs: The purchase order's delivery date. - delivery_address: - type: optional - docs: The purchase order's delivery address. - customer: - type: optional - docs: The contact making the purchase order. - validation: - format: uuid - vendor: - type: optional - docs: The party fulfilling the purchase order. - memo: - type: optional - docs: A memo attached to the purchase order. - company: - type: optional - docs: The company the purchase order belongs to. - total_amount: - type: optional - docs: The purchase order's total amount. - payment_term: - type: optional - docs: The payment term that applies to this transaction. - currency: - type: optional - docs: >- - The purchase order's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - inclusive_of_tax: - type: optional - docs: >- - If the transaction is inclusive or exclusive of tax. `True` if - inclusive, `False` if exclusive. - exchange_rate: - type: optional - docs: The purchase order's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - tracking_categories: optional>> - line_items: optional> - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - PurchaseOrderResponse: - properties: - model: PurchaseOrder - warnings: list - errors: list - logs: optional> - source: - openapi: accounting_v3.yml - PurchaseOrderStatusEnum: - enum: - - DRAFT - - SUBMITTED - - AUTHORIZED - - BILLED - - DELETED - docs: |- - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `AUTHORIZED` - AUTHORIZED - * `BILLED` - BILLED - * `DELETED` - DELETED - source: - openapi: accounting_v3.yml - RemoteData: - docs: >- - # The RemoteData Object - - ### Description - - The `RemoteData` object is used to represent the full data pulled from the - third-party API for an object. - - - ### Usage Example - - TODO - properties: - path: - type: string - docs: The third-party API path that is being called. - data: - type: optional - access: read-only - source: - openapi: accounting_v3.yml - RemoteEndpointInfo: - properties: - method: string - url_path: string - field_traversal_path: list - source: - openapi: accounting_v3.yml - RemoteFieldRemoteFieldClass: - discriminated: false - union: - - string - - RemoteFieldClass - source: - openapi: accounting_v3.yml - inline: true - RemoteField: - properties: - remote_field_class: RemoteFieldRemoteFieldClass - value: optional - source: - openapi: accounting_v3.yml - RemoteFieldApiCoverage: - discriminated: false - union: - - integer - - double - source: - openapi: accounting_v3.yml - inline: true - RemoteFieldApi: - properties: - schema: map - remote_key_name: string - remote_endpoint_info: RemoteEndpointInfo - example_values: optional> - advanced_metadata: optional - coverage: - type: optional - access: read-only - source: - openapi: accounting_v3.yml - RemoteFieldApiResponse: - properties: - Account: optional> - AccountingAttachment: optional> - BalanceSheet: optional> - CashFlowStatement: optional> - CompanyInfo: optional> - Contact: optional> - IncomeStatement: optional> - CreditNote: optional> - Item: optional> - PurchaseOrder: optional> - TrackingCategory: optional> - JournalEntry: optional> - TaxRate: optional> - Invoice: optional> - Payment: optional> - Expense: optional> - VendorCredit: optional> - Transaction: optional> - AccountingPeriod: optional> - GeneralLedgerTransaction: optional> - BankFeedAccount: optional> - Employee: optional> - PaymentMethod: optional> - Project: optional> - PaymentTerm: optional> - source: - openapi: accounting_v3.yml - RemoteFieldClass: - properties: - id: optional - display_name: optional - remote_key_name: optional - description: optional - is_custom: optional - is_required: optional - field_type: optional - field_format: optional - field_choices: optional> - item_schema: optional - source: - openapi: accounting_v3.yml - RemoteFieldRequestRemoteFieldClass: - discriminated: false - union: - - type: string - validation: - format: uuid - - RemoteFieldClass - source: - openapi: accounting_v3.yml - inline: true - RemoteFieldRequest: - properties: - remote_field_class: RemoteFieldRequestRemoteFieldClass - value: optional - source: - openapi: accounting_v3.yml - RemoteKey: - docs: >- - # The RemoteKey Object - - ### Description - - The `RemoteKey` object is used to represent a request for a new remote - key. - - - ### Usage Example - - Post a `GenerateRemoteKey` to receive a new `RemoteKey`. - properties: - name: string - key: string - source: - openapi: accounting_v3.yml - RemoteResponse: - docs: >- - # The RemoteResponse Object - - ### Description - - The `RemoteResponse` object is used to represent information returned from - a third-party endpoint. - - - ### Usage Example - - View the `RemoteResponse` returned from your `DataPassthrough`. - properties: - method: string - path: string - status: integer - response: unknown - response_headers: optional> - response_type: optional - headers: optional> - source: - openapi: accounting_v3.yml - ReportItem: - docs: >- - # The ReportItem Object - - ### Description - - The `ReportItem` object is used to represent a report item for a Balance - Sheet, Cash Flow Statement or Profit and Loss Report. - - - ### Usage Example - - Fetch from the `GET BalanceSheet` endpoint and view the balance sheet's - report items. - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The report item's name. - value: - type: optional - docs: The report item's value. - sub_items: - type: optional>> - access: read-only - company: - type: optional - docs: The company the report item belongs to. - validation: - format: uuid - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - source: - openapi: accounting_v3.yml - RequestFormatEnum: - enum: - - JSON - - XML - - MULTIPART - docs: |- - * `JSON` - JSON - * `XML` - XML - * `MULTIPART` - MULTIPART - source: - openapi: accounting_v3.yml - ResponseTypeEnum: - enum: - - JSON - - BASE64_GZIP - docs: |- - * `JSON` - JSON - * `BASE64_GZIP` - BASE64_GZIP - source: - openapi: accounting_v3.yml - RoleEnum: - enum: - - ADMIN - - DEVELOPER - - MEMBER - - API - - SYSTEM - - MERGE_TEAM - docs: |- - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - source: - openapi: accounting_v3.yml - SelectiveSyncConfigurationsUsageEnum: - enum: - - IN_NEXT_SYNC - - IN_LAST_SYNC - docs: |- - * `IN_NEXT_SYNC` - IN_NEXT_SYNC - * `IN_LAST_SYNC` - IN_LAST_SYNC - source: - openapi: accounting_v3.yml - Status7D1Enum: - enum: - - ACTIVE - - ARCHIVED - docs: |- - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - source: - openapi: accounting_v3.yml - Status895Enum: - enum: - - ACTIVE - - INACTIVE - docs: |- - * `ACTIVE` - ACTIVE - * `INACTIVE` - INACTIVE - source: - openapi: accounting_v3.yml - StatusFd5Enum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - docs: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - source: - openapi: accounting_v3.yml - SyncStatusLastSyncResult: - discriminated: false - union: - - LastSyncResultEnum - - string - source: - openapi: accounting_v3.yml - inline: true - SyncStatusStatus: - discriminated: false - union: - - StatusFd5Enum - - string - source: - openapi: accounting_v3.yml - inline: true - SyncStatus: - docs: >- - # The SyncStatus Object - - ### Description - - The `SyncStatus` object is used to represent the syncing state of an - account - - - ### Usage Example - - View the `SyncStatus` for an account to see how recently its models were - synced. - properties: - model_name: string - model_id: string - last_sync_start: optional - next_sync_start: optional - last_sync_result: optional - last_sync_finished: optional - status: SyncStatusStatus - is_initial_sync: boolean - selective_sync_configurations_usage: optional - source: - openapi: accounting_v3.yml - TaxComponentComponentType: - discriminated: false - docs: >- - Returns PURCHASE if the tax component corresponds to a purchase tax or - SALES if the tax component corresponds to a sales tax. - - - * `SALES` - SALES - - * `PURCHASE` - PURCHASE - union: - - ComponentTypeEnum - - string - source: - openapi: accounting_v3.yml - inline: true - TaxComponent: - docs: >- - # The TaxRate Object - - ### Description - - The `TaxComponent` object is used to represent any sub-taxes that make up - the `TaxRate`. - - - ### Usage Example - - Fetch from the `LIST TaxRates` endpoint and view tax components relevant - to a tax rate. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The tax rate’s name. - validation: - maxLength: 100 - rate: - type: optional - docs: The tax component’s rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - is_compound: - type: optional - docs: Returns True if the tax component is compound, False if not. - component_type: - type: optional - docs: >- - Returns PURCHASE if the tax component corresponds to a purchase tax or - SALES if the tax component corresponds to a sales tax. - - - * `SALES` - SALES - - * `PURCHASE` - PURCHASE - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - source: - openapi: accounting_v3.yml - TaxRateCompany: - discriminated: false - docs: >- - The subsidiary that the tax rate belongs to (in the case of multi-entity - systems). - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - TaxRateStatus: - discriminated: false - docs: >- - The tax rate’s status - `ACTIVE` if an active tax rate, `ARCHIVED` if not - active. - - - * `ACTIVE` - ACTIVE - - * `ARCHIVED` - ARCHIVED - union: - - Status7D1Enum - - string - source: - openapi: accounting_v3.yml - inline: true - TaxRateTaxComponentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TaxComponent - source: - openapi: accounting_v3.yml - inline: true - TaxRate: - docs: >- - # The TaxRate Object - - ### Description - - The `TaxRate` object is used to represent a tax rate. - - - ### Usage Example - - Fetch from the `LIST TaxRates` endpoint and view tax rates relevant to a - company. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - company: - type: optional - docs: >- - The subsidiary that the tax rate belongs to (in the case of - multi-entity systems). - code: - type: optional - docs: >- - The tax code associated with this tax rate or group of tax rates from - the third-party platform. - validation: - maxLength: 100 - name: - type: optional - docs: The tax rate’s name. - validation: - maxLength: 100 - description: - type: optional - docs: The tax rate's description. - status: - type: optional - docs: >- - The tax rate’s status - `ACTIVE` if an active tax rate, `ARCHIVED` if - not active. - - - * `ACTIVE` - ACTIVE - - * `ARCHIVED` - ARCHIVED - country: - type: optional - docs: The country the tax rate is associated with. - validation: - maxLength: 100 - total_tax_rate: - type: optional - docs: The tax’s total tax rate - sum of the tax components (not compounded). - effective_tax_rate: - type: optional - docs: >- - The tax rate’s effective tax rate - total amount of tax with - compounding. - tax_components: - type: optional> - docs: The related tax components of the tax rate. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - TrackingCategoryStatus: - discriminated: false - docs: |- - The tracking category's status. - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - union: - - Status7D1Enum - - string - source: - openapi: accounting_v3.yml - inline: true - TrackingCategoryCategoryType: - discriminated: false - docs: |- - The tracking category’s type. - - * `CLASS` - CLASS - * `DEPARTMENT` - DEPARTMENT - union: - - CategoryTypeEnum - - string - source: - openapi: accounting_v3.yml - inline: true - TrackingCategoryCompany: - discriminated: false - docs: The company the GeneralLedgerTransaction belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - TrackingCategory: - docs: >- - # The TrackingCategory Object - - ### Description - - A `TrackingCategory` object represents a categorization method used to - classify transactions within an accounting platform. They are often used - to group records for reporting and analysis purposes. The most common - types of `TrackingCategories` are Classes and Departments. - - - ### Usage Example - - Fetch from the `GET TrackingCategory` endpoint and view a company's - tracking category. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The tracking category's name. - status: - type: optional - docs: |- - The tracking category's status. - - * `ACTIVE` - ACTIVE - * `ARCHIVED` - ARCHIVED - category_type: - type: optional - docs: |- - The tracking category’s type. - - * `CLASS` - CLASS - * `DEPARTMENT` - DEPARTMENT - parent_category: - type: optional - validation: - format: uuid - company: - type: optional - docs: The company the GeneralLedgerTransaction belongs to. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - TransactionAccount: - discriminated: false - docs: The transaction's account. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - TransactionContact: - discriminated: false - docs: The contact to whom the transaction relates to. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - TransactionCurrency: - discriminated: false - docs: >- - The transaction's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - TransactionTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - TransactionAccountingPeriod: - discriminated: false - docs: The accounting period that the Transaction was generated in. - union: - - type: string - validation: - format: uuid - - AccountingPeriod - source: - openapi: accounting_v3.yml - inline: true - Transaction: - docs: >- - # The Transaction Object - - ### Description - - The `Transaction` common model includes records of all types of - transactions that do not appear in other common models. The type of - transaction can be identified through the type field. More specifically, - it will contain all types of transactions outside of: - - * __Credit Notes__ - - * __Expenses__ - - * __Invoices__ - - * __Journal Entries__ - - * __Payments__ - - * __Purchase Orders__ - - * __Vendor Credits__ - - - ### Usage Example - - Fetch from the `GET Transaction` endpoint and view a company's - transactions. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - transaction_type: - type: optional - docs: >- - The type of transaction, which can by any transaction object not - already included in Merge’s common model. - number: - type: optional - docs: The transaction's number used for identifying purposes. - transaction_date: - type: optional - docs: The date upon which the transaction occurred. - account: - type: optional - docs: The transaction's account. - contact: - type: optional - docs: The contact to whom the transaction relates to. - inclusive_of_tax: - type: optional - docs: >- - If the transaction is inclusive or exclusive of tax. `True` if - inclusive, `False` if exclusive. - total_amount: - type: optional - docs: The total amount being paid after taxes. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - currency: - type: optional - docs: >- - The transaction's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: optional - docs: The transaction's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - company: - type: optional - docs: The company the transaction belongs to. - validation: - format: uuid - tracking_categories: optional>> - line_items: - type: optional> - access: read-only - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - accounting_period: - type: optional - docs: The accounting period that the Transaction was generated in. - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - TransactionCurrencyEnum: - enum: - - XUA - - AFN - - AFA - - ALL - - ALK - - DZD - - ADP - - AOA - - AOK - - AON - - AOR - - ARA - - ARS - - ARM - - ARP - - ARL - - AMD - - AWG - - AUD - - ATS - - AZN - - AZM - - BSD - - BHD - - BDT - - BBD - - BYN - - BYB - - BYR - - BEF - - BEC - - BEL - - BZD - - BMD - - BTN - - BOB - - BOL - - BOV - - BOP - - BAM - - BAD - - BAN - - BWP - - BRC - - BRZ - - BRE - - BRR - - BRN - - BRB - - BRL - - GBP - - BND - - BGL - - BGN - - BGO - - BGM - - BUK - - BIF - - XPF - - KHR - - CAD - - CVE - - KYD - - XAF - - CLE - - CLP - - CLF - - CNX - - CNY - - CNH - - COP - - COU - - KMF - - CDF - - CRC - - HRD - - HRK - - CUC - - CUP - - CYP - - CZK - - CSK - - DKK - - DJF - - DOP - - NLG - - XCD - - DDM - - ECS - - ECV - - EGP - - GQE - - ERN - - EEK - - ETB - - EUR - - XBA - - XEU - - XBB - - XBC - - XBD - - FKP - - FJD - - FIM - - FRF - - XFO - - XFU - - GMD - - GEK - - GEL - - DEM - - GHS - - GHC - - GIP - - XAU - - GRD - - GTQ - - GWP - - GNF - - GNS - - GYD - - HTG - - HNL - - HKD - - HUF - - IMP - - ISK - - ISJ - - INR - - IDR - - IRR - - IQD - - IEP - - ILS - - ILP - - ILR - - ITL - - JMD - - JPY - - JOD - - KZT - - KES - - KWD - - KGS - - LAK - - LVL - - LVR - - LBP - - LSL - - LRD - - LYD - - LTL - - LTT - - LUL - - LUC - - LUF - - MOP - - MKD - - MKN - - MGA - - MGF - - MWK - - MYR - - MVR - - MVP - - MLF - - MTL - - MTP - - MRU - - MRO - - MUR - - MXV - - MXN - - MXP - - MDC - - MDL - - MCF - - MNT - - MAD - - MAF - - MZE - - MZN - - MZM - - MMK - - NAD - - NPR - - ANG - - TWD - - NZD - - NIO - - NIC - - NGN - - KPW - - NOK - - OMR - - PKR - - XPD - - PAB - - PGK - - PYG - - PEI - - PEN - - PES - - PHP - - XPT - - PLN - - PLZ - - PTE - - GWE - - QAR - - XRE - - RHD - - RON - - ROL - - RUB - - RUR - - RWF - - SVC - - WST - - SAR - - RSD - - CSD - - SCR - - SLL - - XAG - - SGD - - SKK - - SIT - - SBD - - SOS - - ZAR - - ZAL - - KRH - - KRW - - KRO - - SSP - - SUR - - ESP - - ESA - - ESB - - XDR - - LKR - - SHP - - XSU - - SDD - - SDG - - SDP - - SRD - - SRG - - SZL - - SEK - - CHF - - SYP - - STN - - STD - - TVD - - TJR - - TJS - - TZS - - XTS - - THB - - XXX - - TPE - - TOP - - TTD - - TND - - TRY - - TRL - - TMT - - TMM - - USD - - USN - - USS - - UGX - - UGS - - UAH - - UAK - - AED - - UYW - - UYU - - UYP - - UYI - - UZS - - VUV - - VES - - VEB - - VEF - - VND - - VNN - - CHE - - CHW - - XOF - - YDD - - YER - - YUN - - YUD - - YUM - - YUR - - ZWN - - ZRN - - ZRZ - - ZMW - - ZMK - - ZWD - - ZWR - - ZWL - docs: >- - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - source: - openapi: accounting_v3.yml - TransactionLineItemItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Item - source: - openapi: accounting_v3.yml - inline: true - TransactionLineItemCurrency: - discriminated: false - docs: >- - The line item's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - TransactionLineItem: - docs: >- - # The TransactionLineItem Object - - ### Description - - The `TransactionLineItem` object is used to represent a transaction's line - items. - - - ### Usage Example - - Fetch from the `GET TransactionLineItem` endpoint and view the - transaction's line items. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - memo: - type: optional - docs: >- - An internal note used by the business to clarify purpose of the - transaction. - unit_price: - type: optional - docs: The line item's unit price. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - quantity: - type: optional - docs: The line item's quantity. - validation: - pattern: ^-?\d{0,24}(?:\.\d{0,8})?$ - item: optional - account: - type: optional - docs: The line item's account. - validation: - format: uuid - tracking_category: - type: optional - docs: The line's associated tracking category. - validation: - format: uuid - availability: deprecated - tracking_categories: - type: optional>> - docs: The transaction line item's associated tracking categories. - total_line_amount: - type: optional - docs: The line item's total. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - tax_rate: - type: optional - docs: The tax rate that applies to this line item. - validation: - format: uuid - currency: - type: optional - docs: >- - The line item's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: optional - docs: The line item's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - company: - type: optional - docs: The company the line belongs to. - validation: - format: uuid - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - source: - openapi: accounting_v3.yml - Type2BbEnum: - enum: - - INVENTORY - - NON_INVENTORY - - SERVICE - - UNKNOWN - docs: |- - * `INVENTORY` - INVENTORY - * `NON_INVENTORY` - NON_INVENTORY - * `SERVICE` - SERVICE - * `UNKNOWN` - UNKNOWN - source: - openapi: accounting_v3.yml - UnderlyingTransactionTypeEnum: - enum: - - INVOICE - - EXPENSE - - TRANSACTION - - JOURNAL_ENTRY - - PAYMENT - - VENDOR_CREDIT - - CREDIT_NOTE - docs: |- - * `INVOICE` - INVOICE - * `EXPENSE` - EXPENSE - * `TRANSACTION` - TRANSACTION - * `JOURNAL_ENTRY` - JOURNAL_ENTRY - * `PAYMENT` - PAYMENT - * `VENDOR_CREDIT` - VENDOR_CREDIT - * `CREDIT_NOTE` - CREDIT_NOTE - source: - openapi: accounting_v3.yml - ValidationProblemSource: - properties: - pointer: string - source: - openapi: accounting_v3.yml - VendorCreditVendor: - discriminated: false - docs: The vendor that owes the gift or refund. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - VendorCreditCurrency: - discriminated: false - docs: >- - The vendor credit's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - VendorCreditCompany: - discriminated: false - docs: The company the vendor credit belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - VendorCreditTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - VendorCreditAccountingPeriod: - discriminated: false - docs: The accounting period that the VendorCredit was generated in. - union: - - type: string - validation: - format: uuid - - AccountingPeriod - source: - openapi: accounting_v3.yml - inline: true - VendorCredit: - docs: >- - # The VendorCredit Object - - ### Description - - A `VendorCredit` is transaction issued by a vendor to the accounting - company, indicating a reduction or cancellation of the amount owed to the - vendor. It is most generally used as an adjustment note used to rectify - errors, returns, or overpayments related to a purchasing transaction. A - `VendorCredit` can be applied to `Accounts Payable` Invoices to decrease - the overall amount of the `Invoice`. - - - ### Usage Example - - Fetch from the `GET VendorCredit` endpoint and view a company's vendor - credits. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - number: - type: optional - docs: The vendor credit's number. - transaction_date: - type: optional - docs: The vendor credit's transaction date. - vendor: - type: optional - docs: The vendor that owes the gift or refund. - total_amount: - type: optional - docs: The vendor credit's total amount. - currency: - type: optional - docs: >- - The vendor credit's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: optional - docs: The vendor credit's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - inclusive_of_tax: - type: optional - docs: >- - If the transaction is inclusive or exclusive of tax. `True` if - inclusive, `False` if exclusive. - company: - type: optional - docs: The company the vendor credit belongs to. - lines: - type: optional> - access: read-only - tracking_categories: optional>> - applied_to_lines: - type: optional> - docs: A list of VendorCredit Applied to Lines objects. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - accounting_period: - type: optional - docs: The accounting period that the VendorCredit was generated in. - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: accounting_v3.yml - VendorCreditApplyLineForInvoiceVendorCredit: - discriminated: false - union: - - type: string - validation: - format: uuid - - VendorCredit - source: - openapi: accounting_v3.yml - inline: true - VendorCreditApplyLineForInvoice: - docs: >- - # The VendorCreditApplyLine Object - - ### Description - - The `VendorCreditApplyLine` object is used to represent a applied vendor - credit. - - - ### Usage Example - - Fetch from the `GET VendorCredit` endpoint and view the vendor credit's - applied to lines. - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - vendor_credit: optional - applied_date: - type: optional - docs: Date that the vendor credit is applied to the invoice. - applied_amount: - type: optional - docs: The amount of the VendorCredit applied to the invoice. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - source: - openapi: accounting_v3.yml - VendorCreditApplyLineForVendorCreditInvoice: - discriminated: false - union: - - type: string - validation: - format: uuid - - Invoice - source: - openapi: accounting_v3.yml - inline: true - VendorCreditApplyLineForVendorCredit: - docs: >- - # The VendorCreditApplyLine Object - - ### Description - - The `VendorCreditApplyLine` object is used to represent a applied vendor - credit. - - - ### Usage Example - - Fetch from the `GET VendorCredit` endpoint and view the vendor credit's - applied to lines. - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - invoice: optional - applied_date: - type: optional - docs: Date that the vendor credit is applied to the invoice. - applied_amount: - type: optional - docs: The amount of the VendorCredit applied to the invoice. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - source: - openapi: accounting_v3.yml - VendorCreditApplyLineForVendorCreditRequestInvoice: - discriminated: false - union: - - type: string - validation: - format: uuid - - Invoice - source: - openapi: accounting_v3.yml - inline: true - VendorCreditApplyLineForVendorCreditRequest: - docs: >- - # The VendorCreditApplyLine Object - - ### Description - - The `VendorCreditApplyLine` object is used to represent a applied vendor - credit. - - - ### Usage Example - - Fetch from the `GET VendorCredit` endpoint and view the vendor credit's - applied to lines. - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - invoice: optional - applied_date: - type: optional - docs: Date that the vendor credit is applied to the invoice. - applied_amount: - type: optional - docs: The amount of the VendorCredit applied to the invoice. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - VendorCreditLineAccount: - discriminated: false - docs: The line's account. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - VendorCreditLineProject: - discriminated: false - union: - - type: string - validation: - format: uuid - - Project - source: - openapi: accounting_v3.yml - inline: true - VendorCreditLineContact: - discriminated: false - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - VendorCreditLine: - docs: >- - # The VendorCreditLine Object - - ### Description - - The `VendorCreditLine` object is used to represent a vendor credit's line - items. - - - ### Usage Example - - Fetch from the `GET VendorCredit` endpoint and view the vendor credit's - line items. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - net_amount: - type: optional - docs: The full value of the credit. - tracking_category: - type: optional - docs: The line's associated tracking category. - validation: - format: uuid - availability: deprecated - tracking_categories: - type: optional>> - docs: The vendor credit line item's associated tracking categories. - description: - type: optional - docs: The line's description. - account: - type: optional - docs: The line's account. - company: - type: optional - docs: The company the line belongs to. - validation: - format: uuid - project: optional - contact: optional - tax_rate: - type: optional - docs: The tax rate that applies to this line item. - validation: - format: uuid - exchange_rate: - type: optional - docs: The vendor credit line item's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - source: - openapi: accounting_v3.yml - VendorCreditLineRequestAccount: - discriminated: false - docs: The line's account. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: accounting_v3.yml - inline: true - VendorCreditLineRequestProject: - discriminated: false - union: - - type: string - validation: - format: uuid - - Project - source: - openapi: accounting_v3.yml - inline: true - VendorCreditLineRequestContact: - discriminated: false - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - VendorCreditLineRequest: - docs: >- - # The VendorCreditLine Object - - ### Description - - The `VendorCreditLine` object is used to represent a vendor credit's line - items. - - - ### Usage Example - - Fetch from the `GET VendorCredit` endpoint and view the vendor credit's - line items. - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - net_amount: - type: optional - docs: The full value of the credit. - tracking_category: - type: optional - docs: The line's associated tracking category. - validation: - format: uuid - availability: deprecated - tracking_categories: - type: optional>> - docs: The vendor credit line item's associated tracking categories. - description: - type: optional - docs: The line's description. - account: - type: optional - docs: The line's account. - company: - type: optional - docs: The company the line belongs to. - validation: - format: uuid - project: optional - contact: optional - tax_rate: - type: optional - docs: The tax rate that applies to this line item. - validation: - format: uuid - exchange_rate: - type: optional - docs: The vendor credit line item's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - VendorCreditRequestVendor: - discriminated: false - docs: The vendor that owes the gift or refund. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: accounting_v3.yml - inline: true - VendorCreditRequestCurrency: - discriminated: false - docs: >- - The vendor credit's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - TransactionCurrencyEnum - - string - source: - openapi: accounting_v3.yml - inline: true - VendorCreditRequestCompany: - discriminated: false - docs: The company the vendor credit belongs to. - union: - - type: string - validation: - format: uuid - - CompanyInfo - source: - openapi: accounting_v3.yml - inline: true - VendorCreditRequestTrackingCategoriesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - TrackingCategory - source: - openapi: accounting_v3.yml - inline: true - VendorCreditRequestAccountingPeriod: - discriminated: false - docs: The accounting period that the VendorCredit was generated in. - union: - - type: string - validation: - format: uuid - - AccountingPeriod - source: - openapi: accounting_v3.yml - inline: true - VendorCreditRequest: - docs: >- - # The VendorCredit Object - - ### Description - - A `VendorCredit` is transaction issued by a vendor to the accounting - company, indicating a reduction or cancellation of the amount owed to the - vendor. It is most generally used as an adjustment note used to rectify - errors, returns, or overpayments related to a purchasing transaction. A - `VendorCredit` can be applied to `Accounts Payable` Invoices to decrease - the overall amount of the `Invoice`. - - - ### Usage Example - - Fetch from the `GET VendorCredit` endpoint and view a company's vendor - credits. - properties: - number: - type: optional - docs: The vendor credit's number. - transaction_date: - type: optional - docs: The vendor credit's transaction date. - vendor: - type: optional - docs: The vendor that owes the gift or refund. - total_amount: - type: optional - docs: The vendor credit's total amount. - currency: - type: optional - docs: >- - The vendor credit's currency. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - exchange_rate: - type: optional - docs: The vendor credit's exchange rate. - validation: - pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ - inclusive_of_tax: - type: optional - docs: >- - If the transaction is inclusive or exclusive of tax. `True` if - inclusive, `False` if exclusive. - company: - type: optional - docs: The company the vendor credit belongs to. - tracking_categories: optional>> - applied_to_lines: - type: optional> - docs: A list of VendorCredit Applied to Lines objects. - accounting_period: - type: optional - docs: The accounting period that the VendorCredit was generated in. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: accounting_v3.yml - VendorCreditResponse: - properties: - model: VendorCredit - warnings: list - errors: list - logs: optional> - source: - openapi: accounting_v3.yml - WarningValidationProblem: - properties: - source: optional - title: string - detail: string - problem_type: string - source: - openapi: accounting_v3.yml - WebhookReceiver: - properties: - event: string - is_active: boolean - key: optional - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/accountDetails.yml b/.mock/definition/Accounting/accountDetails.yml deleted file mode 100644 index 865ea0552..000000000 --- a/.mock/definition/Accounting/accountDetails.yml +++ /dev/null @@ -1,38 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /accounting/v1/account-details - method: GET - auth: - - tokenAuth: [] - docs: Get details for a linked account. - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.AccountDetails - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - integration: BambooHR - integration_slug: bamboohr - category: hris - end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - end_user_organization_name: Waystar Royco - end_user_email_address: kendall.roy@waystar-royco.com - status: COMPLETE - webhook_listener_url: >- - https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: true - account_type: PRODUCTION - completed_at: '2024-08-26T20:11:19Z' - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/accountToken.yml b/.mock/definition/Accounting/accountToken.yml deleted file mode 100644 index 5218fcc77..000000000 --- a/.mock/definition/Accounting/accountToken.yml +++ /dev/null @@ -1,47 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /accounting/v1/account-token/{public_token} - method: GET - auth: - - tokenAuth: [] - docs: >- - Returns the account token for the end user with the provided public - token. - source: - openapi: accounting_v3.yml - path-parameters: - public_token: string - response: - docs: '' - type: accountingRoot.AccountToken - status-code: 200 - examples: - - path-parameters: - public_token: public_token - headers: - X-Account-Token: '[object Object]' - response: - body: - account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB - integration: - name: name - abbreviated_name: abbreviated_name - categories: - - hris - image: image - square_image: square_image - color: color - slug: slug - api_endpoints_to_documentation_urls: - key: value - webhook_setup_guide_url: webhook_setup_guide_url - category_beta_status: - key: value - id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/accountingPeriods.yml b/.mock/definition/Accounting/accountingPeriods.yml deleted file mode 100644 index 871b63667..000000000 --- a/.mock/definition/Accounting/accountingPeriods.yml +++ /dev/null @@ -1,136 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/accounting-periods - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `AccountingPeriod` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: AccountingPeriodsListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedAccountingPeriodList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 3015f7b1-4d01-460d-bfab-02a52d16cbd0 - remote_id: '2804580' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: April 2020 Financials - status: ACTIVE - start_date: '2020-03-31T00:00:00Z' - end_date: '2020-05-01T00:00:00Z' - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - retrieve: - path: /accounting/v1/accounting-periods/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `AccountingPeriod` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: AccountingPeriodsRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.AccountingPeriod - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 3015f7b1-4d01-460d-bfab-02a52d16cbd0 - remote_id: '2804580' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: April 2020 Financials - status: ACTIVE - start_date: '2020-03-31T00:00:00Z' - end_date: '2020-05-01T00:00:00Z' - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/accounts.yml b/.mock/definition/Accounting/accounts.yml deleted file mode 100644 index f1fb20b8b..000000000 --- a/.mock/definition/Accounting/accounts.yml +++ /dev/null @@ -1,556 +0,0 @@ -types: - AccountsListRequestClassification: - enum: - - value: '' - name: EMPTY - - ASSET - - EQUITY - - EXPENSE - - LIABILITY - - REVENUE - source: - openapi: accounting_v3.yml - AccountsListRequestRemoteFields: - enum: - - classification - - value: classification,status - name: ClassificationStatus - - status - source: - openapi: accounting_v3.yml - AccountsListRequestShowEnumOrigins: - enum: - - classification - - value: classification,status - name: ClassificationStatus - - status - source: - openapi: accounting_v3.yml - AccountsListRequestStatus: - enum: - - value: '' - name: EMPTY - - ACTIVE - - INACTIVE - - PENDING - source: - openapi: accounting_v3.yml - AccountsRetrieveRequestRemoteFields: - enum: - - classification - - value: classification,status - name: ClassificationStatus - - status - source: - openapi: accounting_v3.yml - AccountsRetrieveRequestShowEnumOrigins: - enum: - - classification - - value: classification,status - name: ClassificationStatus - - status - source: - openapi: accounting_v3.yml -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/accounts - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Account` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: AccountsListRequest - query-parameters: - account_type: - type: optional - docs: If provided, will only return accounts with the passed in enum. - classification: - type: optional - docs: If provided, will only return accounts with this classification. - company_id: - type: optional - docs: If provided, will only return accounts for this company. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - name: - type: optional - docs: If provided, will only return Accounts with this name. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - status: - type: optional - docs: If provided, will only return accounts with this status. - response: - docs: '' - type: accountingRoot.PaginatedAccountList - status-code: 200 - examples: - - query-parameters: - account_type: account_type - classification: '' - company_id: company_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - name: name - page_size: 1 - remote_fields: classification - remote_id: remote_id - show_enum_origins: classification - status: '' - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '21' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Cash - description: Cash - classification: ASSET - type: Asset - account_type: BANK - status: ACTIVE - current_balance: 1.1 - currency: XUA - account_number: X12Y9AB - parent_account: 22d92d6c-22f9-11ed-861d-0242ac120002 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - create: - path: /accounting/v1/accounts - method: POST - auth: - - tokenAuth: [] - docs: Creates an `Account` object with the given values. - source: - openapi: accounting_v3.yml - request: - name: AccountEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: accountingRoot.AccountRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.AccountResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '21' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Cash - description: Cash - classification: ASSET - type: Asset - account_type: BANK - status: ACTIVE - current_balance: 1.1 - currency: XUA - account_number: X12Y9AB - parent_account: 22d92d6c-22f9-11ed-861d-0242ac120002 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /accounting/v1/accounts/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Account` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: AccountsRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: accountingRoot.Account - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: classification - show_enum_origins: classification - headers: - X-Account-Token: X-Account-Token - response: - body: - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '21' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Cash - description: Cash - classification: ASSET - type: Asset - account_type: BANK - status: ACTIVE - current_balance: 1.1 - currency: XUA - account_number: X12Y9AB - parent_account: 22d92d6c-22f9-11ed-861d-0242ac120002 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - metaPostRetrieve: - path: /accounting/v1/accounts/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Account` POSTs. - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/addresses.yml b/.mock/definition/Accounting/addresses.yml deleted file mode 100644 index c7dc06e93..000000000 --- a/.mock/definition/Accounting/addresses.yml +++ /dev/null @@ -1,68 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /accounting/v1/addresses/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Address` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: AddressesRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: accountingRoot.Address - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: type - show_enum_origins: type - headers: - X-Account-Token: X-Account-Token - response: - body: - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - type: BILLING - street_1: 2920 Broadway - street_2: 2nd Floor - city: New York - state: - key: value - country_subdivision: NY - country: AF - zip_code: '10027' - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/asyncPassthrough.yml b/.mock/definition/Accounting/asyncPassthrough.yml deleted file mode 100644 index 72b58442c..000000000 --- a/.mock/definition/Accounting/asyncPassthrough.yml +++ /dev/null @@ -1,74 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /accounting/v1/async-passthrough - method: POST - auth: - - tokenAuth: [] - docs: >- - Asynchronously pull data from an endpoint not currently supported by - Merge. - source: - openapi: accounting_v3.yml - request: - body: accountingRoot.DataPassthroughRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.AsyncPassthroughReciept - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - method: GET - path: /scooters - response: - body: - async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd - retrieve: - path: /accounting/v1/async-passthrough/{async_passthrough_receipt_id} - method: GET - auth: - - tokenAuth: [] - docs: Retrieves data from earlier async-passthrough POST request - source: - openapi: accounting_v3.yml - path-parameters: - async_passthrough_receipt_id: string - response: - docs: '' - type: AsyncPassthroughRetrieveResponse - status-code: 200 - examples: - - path-parameters: - async_passthrough_receipt_id: async_passthrough_receipt_id - headers: - X-Account-Token: X-Account-Token - response: - body: - method: GET - path: /scooters - status: 200 - response: - key: value - response_headers: - X-Page-Token: value - response_type: JSON - headers: - EXTRA-HEADER: value - Authorization: - source: - openapi: accounting_v3.yml -types: - AsyncPassthroughRetrieveResponse: - discriminated: false - union: - - accountingRoot.RemoteResponse - - string - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/asyncTasks.yml b/.mock/definition/Accounting/asyncTasks.yml deleted file mode 100644 index f4ca6af13..000000000 --- a/.mock/definition/Accounting/asyncTasks.yml +++ /dev/null @@ -1,83 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /accounting/v1/async-tasks/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `AsyncPostTask` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - response: - docs: '' - type: accountingRoot.AsyncPostTask - status-code: 200 - examples: - - path-parameters: - id: id - headers: - X-Account-Token: X-Account-Token - response: - body: - status: QUEUED - result: - status_code: 201 - response: - model: - id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - remote_id: '990110' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - integration_params: - unique_integration_field: unique_integration_field_value - linked_account_params: - unique_linked_account_field: unique_linked_account_field_value - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - type: ACCOUNTS_RECEIVABLE - contact: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 - number: AIQ12546 - issue_date: '2020-03-31T00:00:00Z' - due_date: '2020-04-15T00:00:00Z' - memo: Weekly Payment - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - employee: 7442f0d5-722d-45bd-b807-6e38489d37fe - paid_on_date: '2020-04-01T00:00:00Z' - currency: USD - exchange_rate: '2.9' - status: DRAFT - total_discount: 0 - sub_total: 100 - total_tax_amount: 5 - total_amount: 105 - balance: 105 - inclusive_of_tax: false - remote_updated_at: '2020-04-01T00:00:00Z' - tracking_categories: - - 7dc5ca17-d311-44cd-9ce0-333080367a18 - - 6aa0700c-48e1-4c4a-8162-02e6a582df05 - - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 - purchase_orders: - - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 - - dd70ca2f-b120-46fa-889a-9604037f45fd - - 889b281d-739c-4759-95b8-0aedb3947131 - accounting_period: 7dc5ca17-d311-44cd-9ce0-333080367a18 - payments: - - b26fd49a-cbae-470a-a8f8-bcbc119e0390 - applied_payments: - - 9017594e-dc33-4113-a5d2-b0f928e34fdd - remote_data: - - path: /actions - data: - - Varies by platform - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/attachments.yml b/.mock/definition/Accounting/attachments.yml deleted file mode 100644 index fd49f37f5..000000000 --- a/.mock/definition/Accounting/attachments.yml +++ /dev/null @@ -1,432 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/attachments - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `AccountingAttachment` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: AttachmentsListRequest - query-parameters: - company_id: - type: optional - docs: >- - If provided, will only return accounting attachments for this - company. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: accountingRoot.PaginatedAccountingAttachmentList - status-code: 200 - examples: - - query-parameters: - company_id: company_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '1018270' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - file_name: invoice.png - file_url: >- - https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - create: - path: /accounting/v1/attachments - method: POST - auth: - - tokenAuth: [] - docs: Creates an `AccountingAttachment` object with the given values. - source: - openapi: accounting_v3.yml - request: - name: AccountingAttachmentEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: accountingRoot.AccountingAttachmentRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.AccountingAttachmentResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '1018270' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - file_name: invoice.png - file_url: >- - https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /accounting/v1/attachments/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `AccountingAttachment` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: AttachmentsRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.AccountingAttachment - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '1018270' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - file_name: invoice.png - file_url: >- - https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - metaPostRetrieve: - path: /accounting/v1/attachments/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `AccountingAttachment` POSTs. - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/auditTrail.yml b/.mock/definition/Accounting/auditTrail.yml deleted file mode 100644 index f8feeb9b3..000000000 --- a/.mock/definition/Accounting/auditTrail.yml +++ /dev/null @@ -1,108 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/audit-trail - method: GET - auth: - - tokenAuth: [] - docs: Gets a list of audit trail events. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: AuditTrailListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - end_date: - type: optional - docs: >- - If included, will only include audit trail events that occurred - before this time - event_type: - type: optional - docs: >- - If included, will only include events with the given event type. - Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, - `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, - `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, - `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, - `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, - `DELETED_LINKED_ACCOUNT`, - `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, - `CREATED_DESTINATION`, `DELETED_DESTINATION`, - `CHANGED_DESTINATION`, `CHANGED_SCOPES`, - `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, - `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, - `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, - `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, - `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, - `END_USER_CREDENTIALS_ACCESSED` - page_size: - type: optional - docs: Number of results to return per page. - start_date: - type: optional - docs: >- - If included, will only include audit trail events that occurred - after this time - user_email: - type: optional - docs: >- - If provided, this will return events associated with the specified - user email. Please note that the email address reflects the user's - email at the time of the event, and may not be their current - email. - response: - docs: '' - type: accountingRoot.PaginatedAuditLogEventList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_date: end_date - event_type: event_type - page_size: 1 - start_date: start_date - user_email: user_email - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: b5ceea2a-7171-47ce-8090-165cfce5572c - user_name: Gil Feig - user_email: hello@merge.dev - role: ADMIN - ip_address: 192.0.2.123 - event_type: CREATED_REMOTE_PRODUCTION_API_KEY - event_description: >- - Organization-wide Scopes for model hris.Employee updated - from Read to Read+Write - created_at: '2024-01-15T09:30:00Z' - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/availableActions.yml b/.mock/definition/Accounting/availableActions.yml deleted file mode 100644 index 8a30ab4bd..000000000 --- a/.mock/definition/Accounting/availableActions.yml +++ /dev/null @@ -1,52 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /accounting/v1/available-actions - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of models and actions available for an account. - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.AvailableActions - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - integration: - name: name - abbreviated_name: abbreviated_name - categories: - - hris - image: image - square_image: square_image - color: color - slug: slug - api_endpoints_to_documentation_urls: - key: value - webhook_setup_guide_url: webhook_setup_guide_url - category_beta_status: - key: value - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/balanceSheets.yml b/.mock/definition/Accounting/balanceSheets.yml deleted file mode 100644 index 7f0352bc4..000000000 --- a/.mock/definition/Accounting/balanceSheets.yml +++ /dev/null @@ -1,266 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/balance-sheets - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `BalanceSheet` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: BalanceSheetsListRequest - query-parameters: - company_id: - type: optional - docs: If provided, will only return balance sheets for this company. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: accountingRoot.PaginatedBalanceSheetList - status-code: 200 - examples: - - query-parameters: - company_id: company_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - remote_id: '8937018' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: BalanceSheet - currency: XUA - company: company - date: '2021-10-01T00:00:00Z' - net_assets: 1000 - assets: - - remote_id: '10010' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Assets - value: 1000 - sub_items: - - remote_id: '10300' - name: Revenue - San Francisco - value: 500 - - remote_id: '10301' - name: Revenue - New York - value: 500 - liabilities: - - remote_id: '10011' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Liabilities - value: 500 - sub_items: - - remote_id: '10300' - name: Revenue - San Francisco - value: 500 - - remote_id: '10301' - name: Revenue - New York - value: 500 - equity: - - remote_id: '10012' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Equity - value: 500 - sub_items: - - remote_id: '10300' - name: Revenue - San Francisco - value: 500 - - remote_id: '10301' - name: Revenue - New York - value: 500 - remote_generated_at: '2021-10-01T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - retrieve: - path: /accounting/v1/balance-sheets/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `BalanceSheet` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: BalanceSheetsRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.BalanceSheet - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - remote_id: '8937018' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: BalanceSheet - currency: XUA - company: company - date: '2021-10-01T00:00:00Z' - net_assets: 1000 - assets: - - remote_id: '10010' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Assets - value: 1000 - sub_items: - - remote_id: '10300' - name: Revenue - San Francisco - value: 500 - - remote_id: '10301' - name: Revenue - New York - value: 500 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - liabilities: - - remote_id: '10011' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Liabilities - value: 500 - sub_items: - - remote_id: '10300' - name: Revenue - San Francisco - value: 500 - - remote_id: '10301' - name: Revenue - New York - value: 500 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - equity: - - remote_id: '10012' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Equity - value: 500 - sub_items: - - remote_id: '10300' - name: Revenue - San Francisco - value: 500 - - remote_id: '10301' - name: Revenue - New York - value: 500 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - remote_generated_at: '2021-10-01T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - data: - key: value - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/bankFeedAccounts.yml b/.mock/definition/Accounting/bankFeedAccounts.yml deleted file mode 100644 index edf14a7a9..000000000 --- a/.mock/definition/Accounting/bankFeedAccounts.yml +++ /dev/null @@ -1,412 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/bank-feed-accounts - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `BankFeedAccount` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: BankFeedAccountsListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedBankFeedAccountList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 - remote_id: '987300' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - source_account_id: '123566909' - target_account_id: 49cd5a42-b311-4750-9361-52e2ed1d4653 - source_account_name: Travel Bank Account - source_account_number: '12567' - target_account_name: Netsuite Travel Bank Account - currency: XUA - feed_status: ACTIVE - feed_start_date: '2024-02-02T00:00:00Z' - source_account_balance: 123.94 - account_type: BANK - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - null - create: - path: /accounting/v1/bank-feed-accounts - method: POST - auth: - - tokenAuth: [] - docs: Creates a `BankFeedAccount` object with the given values. - source: - openapi: accounting_v3.yml - request: - name: BankFeedAccountEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: accountingRoot.BankFeedAccountRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.BankFeedAccountResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 - remote_id: '987300' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - source_account_id: '123566909' - target_account_id: 49cd5a42-b311-4750-9361-52e2ed1d4653 - source_account_name: Travel Bank Account - source_account_number: '12567' - target_account_name: Netsuite Travel Bank Account - currency: XUA - feed_status: ACTIVE - feed_start_date: '2024-02-02T00:00:00Z' - source_account_balance: 123.94 - account_type: BANK - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - key: value - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /accounting/v1/bank-feed-accounts/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `BankFeedAccount` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: BankFeedAccountsRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.BankFeedAccount - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 - remote_id: '987300' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - source_account_id: '123566909' - target_account_id: 49cd5a42-b311-4750-9361-52e2ed1d4653 - source_account_name: Travel Bank Account - source_account_number: '12567' - target_account_name: Netsuite Travel Bank Account - currency: XUA - feed_status: ACTIVE - feed_start_date: '2024-02-02T00:00:00Z' - source_account_balance: 123.94 - account_type: BANK - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - key: value - metaPostRetrieve: - path: /accounting/v1/bank-feed-accounts/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `BankFeedAccount` POSTs. - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/bankFeedTransactions.yml b/.mock/definition/Accounting/bankFeedTransactions.yml deleted file mode 100644 index 8a23cacb8..000000000 --- a/.mock/definition/Accounting/bankFeedTransactions.yml +++ /dev/null @@ -1,435 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/bank-feed-transactions - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `BankFeedTransaction` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: BankFeedTransactionsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_processed: - type: optional - docs: >- - If provided, will only return bank feed transactions with this - is_processed value - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: accountingRoot.PaginatedBankFeedTransactionList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - is_processed: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 - remote_id: '987300' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - bank_feed_account: bank_feed_account - transaction_date: '2024-02-02T00:00:00Z' - posted_date: '2024-02-03T00:00:00Z' - amount: 100.1 - description: Lunch expense - transaction_type: payment - payee: Elmo's diner - credit_or_debit: CREDIT - source_transaction_id: '124569' - remote_was_deleted: true - is_processed: true - create: - path: /accounting/v1/bank-feed-transactions - method: POST - auth: - - tokenAuth: [] - docs: Creates a `BankFeedTransaction` object with the given values. - source: - openapi: accounting_v3.yml - request: - name: BankFeedTransactionEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: accountingRoot.BankFeedTransactionRequestRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.BankFeedTransactionResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 - remote_id: '987300' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - bank_feed_account: bank_feed_account - transaction_date: '2024-02-02T00:00:00Z' - posted_date: '2024-02-03T00:00:00Z' - amount: 100.1 - description: Lunch expense - transaction_type: payment - payee: Elmo's diner - credit_or_debit: CREDIT - source_transaction_id: '124569' - remote_was_deleted: true - is_processed: true - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /accounting/v1/bank-feed-transactions/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `BankFeedTransaction` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: BankFeedTransactionsRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.BankFeedTransaction - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 - remote_id: '987300' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - bank_feed_account: bank_feed_account - transaction_date: '2024-02-02T00:00:00Z' - posted_date: '2024-02-03T00:00:00Z' - amount: 100.1 - description: Lunch expense - transaction_type: payment - payee: Elmo's diner - credit_or_debit: CREDIT - source_transaction_id: '124569' - remote_was_deleted: true - is_processed: true - metaPostRetrieve: - path: /accounting/v1/bank-feed-transactions/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `BankFeedTransaction` POSTs. - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/cashFlowStatements.yml b/.mock/definition/Accounting/cashFlowStatements.yml deleted file mode 100644 index 52afdc7ac..000000000 --- a/.mock/definition/Accounting/cashFlowStatements.yml +++ /dev/null @@ -1,266 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/cash-flow-statements - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `CashFlowStatement` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: CashFlowStatementsListRequest - query-parameters: - company_id: - type: optional - docs: >- - If provided, will only return cash flow statements for this - company. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: accountingRoot.PaginatedCashFlowStatementList - status-code: 200 - examples: - - query-parameters: - company_id: company_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - remote_id: '8211088' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: CashFlow - currency: XUA - company: company - start_period: '2020-01-01T00:00:00Z' - end_period: '2020-03-31T00:00:00Z' - cash_at_beginning_of_period: 5000 - cash_at_end_of_period: 4063.52 - operating_activities: - - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-09-18T00:00:00Z' - name: Operating Activities - value: 1000 - sub_items: - - remote_id: '23042938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-09-18T00:00:00Z' - name: Net Income - value: 1097.13 - investing_activities: - - remote_id: '192406939' - created_at: '2021-11-15T00:00:00Z' - modified_at: '2021-11-18T00:00:00Z' - name: Equipment - value: 1000 - sub_items: - - created_at: '2021-11-15T00:00:00Z' - modified_at: '2021-09-18T00:00:00Z' - name: Equipment - value: 1000 - financing_activities: - - remote_id: '192406939' - created_at: '2021-11-15T00:00:00Z' - modified_at: '2021-11-15T00:00:00Z' - sub_items: - - remote_id: '10300' - name: Revenue - San Francisco - value: 500 - - remote_id: '10301' - name: Revenue - New York - value: 500 - remote_generated_at: '2020-04-01T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - retrieve: - path: /accounting/v1/cash-flow-statements/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `CashFlowStatement` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: CashFlowStatementsRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.CashFlowStatement - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - remote_id: '8211088' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: CashFlow - currency: XUA - company: company - start_period: '2020-01-01T00:00:00Z' - end_period: '2020-03-31T00:00:00Z' - cash_at_beginning_of_period: 5000 - cash_at_end_of_period: 4063.52 - operating_activities: - - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-09-18T00:00:00Z' - name: Operating Activities - value: 1000 - sub_items: - - remote_id: '23042938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-09-18T00:00:00Z' - name: Net Income - value: 1097.13 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - investing_activities: - - remote_id: '192406939' - created_at: '2021-11-15T00:00:00Z' - modified_at: '2021-11-18T00:00:00Z' - name: Equipment - value: 1000 - sub_items: - - created_at: '2021-11-15T00:00:00Z' - modified_at: '2021-09-18T00:00:00Z' - name: Equipment - value: 1000 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - financing_activities: - - remote_id: '192406939' - created_at: '2021-11-15T00:00:00Z' - modified_at: '2021-11-15T00:00:00Z' - name: Revenue - value: 1000 - sub_items: - - remote_id: '10300' - name: Revenue - San Francisco - value: 500 - - remote_id: '10301' - name: Revenue - New York - value: 500 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - remote_generated_at: '2020-04-01T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/companyInfo.yml b/.mock/definition/Accounting/companyInfo.yml deleted file mode 100644 index 76a4eaf10..000000000 --- a/.mock/definition/Accounting/companyInfo.yml +++ /dev/null @@ -1,229 +0,0 @@ -types: - CompanyInfoListRequestExpandItem: - enum: - - addresses - - phone_numbers - source: - openapi: accounting_v3.yml - CompanyInfoRetrieveRequestExpandItem: - enum: - - addresses - - phone_numbers - source: - openapi: accounting_v3.yml -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/company-info - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `CompanyInfo` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: CompanyInfoListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: accountingRoot.PaginatedCompanyInfoList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Merge Pickleball Company - legal_name: Merge Pickleball Company Inc. - tax_number: 11-0011000 - fiscal_year_end_month: 12 - fiscal_year_end_day: 31 - currency: - key: value - remote_created_at: '2020-03-31T00:00:00Z' - urls: - - null - addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - street_1: 2920 Broadway - street_2: 2nd Floor - city: New York - state: NY - country: US - zip_code: '10027' - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - retrieve: - path: /accounting/v1/company-info/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `CompanyInfo` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: CompanyInfoRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.CompanyInfo - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Merge Pickleball Company - legal_name: Merge Pickleball Company Inc. - tax_number: 11-0011000 - fiscal_year_end_month: 12 - fiscal_year_end_day: 31 - currency: - key: value - remote_created_at: '2020-03-31T00:00:00Z' - urls: - - urls - addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - type: BILLING - street_1: 2920 Broadway - street_2: 2nd Floor - city: New York - state: NY - country_subdivision: NY - country: US - zip_code: '10027' - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - number: '+3198675309' - type: Mobile - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/contacts.yml b/.mock/definition/Accounting/contacts.yml deleted file mode 100644 index dfa18135d..000000000 --- a/.mock/definition/Accounting/contacts.yml +++ /dev/null @@ -1,651 +0,0 @@ -types: - ContactsListRequestExpandItem: - enum: - - addresses - - company - - phone_numbers - source: - openapi: accounting_v3.yml - ContactsListRequestStatus: - enum: - - value: '' - name: EMPTY - - ACTIVE - - ARCHIVED - source: - openapi: accounting_v3.yml - ContactsRetrieveRequestExpandItem: - enum: - - addresses - - company - - phone_numbers - source: - openapi: accounting_v3.yml -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/contacts - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Contact` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: ContactsListRequest - query-parameters: - company_id: - type: optional - docs: If provided, will only return contacts for this company. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - email_address: - type: optional - docs: If provided, will only return Contacts that match this email. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_customer: - type: optional - docs: >- - If provided, will only return Contacts that are denoted as - customers. - is_supplier: - type: optional - docs: >- - If provided, will only return Contacts that are denoted as - suppliers. - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - name: - type: optional - docs: If provided, will only return Contacts that match this name. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - status: - type: optional - docs: If provided, will only return Contacts that match this status. - response: - docs: '' - type: accountingRoot.PaginatedContactList - status-code: 200 - examples: - - query-parameters: - company_id: company_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - email_address: email_address - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - is_customer: is_customer - is_supplier: is_supplier - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - name: name - page_size: 1 - remote_fields: status - remote_id: remote_id - show_enum_origins: status - status: '' - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: c640b80b-fac9-409f-aa19-1f9221aec445 - remote_id: '11167' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Gil Feig's pickleball store - is_supplier: true - is_customer: true - email_address: pickleball@merge.dev - tax_number: 12-3456789 - status: ACTIVE - currency: USD - remote_updated_at: '2020-03-31T00:00:00Z' - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - addresses: - - 2f2702aa-8948-492b-a412-2acdf6d2c499 - - d98c7428-8dda-48a8-a1da-c570f65e2375 - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - number: '+3198675309' - type: Mobile - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - create: - path: /accounting/v1/contacts - method: POST - auth: - - tokenAuth: [] - docs: Creates a `Contact` object with the given values. - source: - openapi: accounting_v3.yml - request: - name: ContactEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: accountingRoot.ContactRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.ContactResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: c640b80b-fac9-409f-aa19-1f9221aec445 - remote_id: '11167' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Gil Feig's pickleball store - is_supplier: true - is_customer: true - email_address: pickleball@merge.dev - tax_number: 12-3456789 - status: ACTIVE - currency: USD - remote_updated_at: '2020-03-31T00:00:00Z' - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - addresses: - - 2f2702aa-8948-492b-a412-2acdf6d2c499 - - d98c7428-8dda-48a8-a1da-c570f65e2375 - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - number: '+3198675309' - type: Mobile - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /accounting/v1/contacts/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Contact` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: ContactsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: accountingRoot.Contact - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - remote_fields: status - show_enum_origins: status - headers: - X-Account-Token: X-Account-Token - response: - body: - id: c640b80b-fac9-409f-aa19-1f9221aec445 - remote_id: '11167' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Gil Feig's pickleball store - is_supplier: true - is_customer: true - email_address: pickleball@merge.dev - tax_number: 12-3456789 - status: ACTIVE - currency: USD - remote_updated_at: '2020-03-31T00:00:00Z' - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - addresses: - - 2f2702aa-8948-492b-a412-2acdf6d2c499 - - d98c7428-8dda-48a8-a1da-c570f65e2375 - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - number: '+3198675309' - type: Mobile - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - metaPostRetrieve: - path: /accounting/v1/contacts/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Contact` POSTs. - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - remoteFieldClassesList: - path: /accounting/v1/contacts/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: ContactsRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - field_choices - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/creditNotes.yml b/.mock/definition/Accounting/creditNotes.yml deleted file mode 100644 index db88f86f6..000000000 --- a/.mock/definition/Accounting/creditNotes.yml +++ /dev/null @@ -1,668 +0,0 @@ -types: - CreditNotesListRequestExpandItem: - enum: - - accounting_period - - applied_payments - - company - - contact - - line_items - - payments - - tracking_categories - source: - openapi: accounting_v3.yml - CreditNotesListRequestRemoteFields: - enum: - - status - - value: status,type - name: StatusType - - type - source: - openapi: accounting_v3.yml - CreditNotesListRequestShowEnumOrigins: - enum: - - status - - value: status,type - name: StatusType - - type - source: - openapi: accounting_v3.yml - CreditNotesRetrieveRequestExpandItem: - enum: - - accounting_period - - applied_payments - - company - - contact - - line_items - - payments - - tracking_categories - source: - openapi: accounting_v3.yml - CreditNotesRetrieveRequestRemoteFields: - enum: - - status - - value: status,type - name: StatusType - - type - source: - openapi: accounting_v3.yml - CreditNotesRetrieveRequestShowEnumOrigins: - enum: - - status - - value: status,type - name: StatusType - - type - source: - openapi: accounting_v3.yml -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/credit-notes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `CreditNote` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: CreditNotesListRequest - query-parameters: - company_id: - type: optional - docs: If provided, will only return credit notes for this company. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - transaction_date_after: - type: optional - docs: If provided, will only return objects created after this datetime. - transaction_date_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - response: - docs: '' - type: accountingRoot.PaginatedCreditNoteList - status-code: 200 - examples: - - query-parameters: - company_id: company_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_fields: status - remote_id: remote_id - show_enum_origins: status - transaction_date_after: '2024-01-15T09:30:00Z' - transaction_date_before: '2024-01-15T09:30:00Z' - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - remote_id: '123877' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - transaction_date: '2020-03-31T00:00:00Z' - status: SUBMITTED - number: CN-29 - contact: contact - company: company - exchange_rate: '2.9' - total_amount: 50 - remaining_credit: 20 - inclusive_of_tax: true - line_items: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - item: 0e3fd929-436c-4fd4-a48b-0c61f68d6178 - name: Basic Monthly - description: prorated amount for items - quantity: quantity - memo: privNote - unit_price: '5.0' - tax_rate: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - total_line_amount: '5.0' - tracking_categories: - - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - account: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - contact: 908934-49j9-093f-0989-908923908 - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - remote_was_deleted: true - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - currency: XUA - remote_created_at: '2020-03-31T00:00:00Z' - remote_updated_at: '2020-03-31T00:00:00Z' - payments: - - b26fd49a-cbae-470a-a8f8-bcbc119e0390 - applied_payments: - - a9a94a75-19c1-41fe-90d8-d9ba959c38e5 - accounting_period: accounting_period - applied_to_lines: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - create: - path: /accounting/v1/credit-notes - method: POST - auth: - - tokenAuth: [] - docs: Creates a `CreditNote` object with the given values. - source: - openapi: accounting_v3.yml - request: - name: CreditNoteEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: accountingRoot.CreditNoteRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.CreditNoteResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - remote_id: '123877' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - transaction_date: '2020-03-31T00:00:00Z' - status: SUBMITTED - number: CN-29 - contact: contact - company: company - exchange_rate: '2.9' - total_amount: 50 - remaining_credit: 20 - inclusive_of_tax: true - line_items: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - item: 0e3fd929-436c-4fd4-a48b-0c61f68d6178 - name: Basic Monthly - description: prorated amount for items - quantity: quantity - memo: privNote - unit_price: '5.0' - tax_rate: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - total_line_amount: '5.0' - tracking_categories: - - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - account: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - contact: 908934-49j9-093f-0989-908923908 - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - remote_was_deleted: true - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - currency: XUA - remote_created_at: '2020-03-31T00:00:00Z' - remote_updated_at: '2020-03-31T00:00:00Z' - payments: - - b26fd49a-cbae-470a-a8f8-bcbc119e0390 - applied_payments: - - a9a94a75-19c1-41fe-90d8-d9ba959c38e5 - accounting_period: accounting_period - applied_to_lines: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /accounting/v1/credit-notes/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `CreditNote` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: CreditNotesRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: accountingRoot.CreditNote - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: status - show_enum_origins: status - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - remote_id: '123877' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - transaction_date: '2020-03-31T00:00:00Z' - status: SUBMITTED - number: CN-29 - contact: contact - company: company - exchange_rate: '2.9' - total_amount: 50 - remaining_credit: 20 - inclusive_of_tax: true - line_items: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - item: 0e3fd929-436c-4fd4-a48b-0c61f68d6178 - name: Basic Monthly - description: prorated amount for items - quantity: quantity - memo: privNote - unit_price: '5.0' - tax_rate: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - total_line_amount: '5.0' - tracking_categories: - - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - account: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - contact: 908934-49j9-093f-0989-908923908 - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - remote_was_deleted: true - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - currency: XUA - remote_created_at: '2020-03-31T00:00:00Z' - remote_updated_at: '2020-03-31T00:00:00Z' - payments: - - b26fd49a-cbae-470a-a8f8-bcbc119e0390 - applied_payments: - - a9a94a75-19c1-41fe-90d8-d9ba959c38e5 - accounting_period: accounting_period - applied_to_lines: - - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - remote_was_deleted: true - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - metaPostRetrieve: - path: /accounting/v1/credit-notes/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `CreditNote` POSTs. - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/deleteAccount.yml b/.mock/definition/Accounting/deleteAccount.yml deleted file mode 100644 index ac30455d0..000000000 --- a/.mock/definition/Accounting/deleteAccount.yml +++ /dev/null @@ -1,17 +0,0 @@ -service: - auth: false - base-path: '' - endpoints: - delete: - path: /accounting/v1/delete-account - method: POST - auth: - - tokenAuth: [] - docs: Delete a linked account. - source: - openapi: accounting_v3.yml - examples: - - headers: - X-Account-Token: X-Account-Token - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/employees.yml b/.mock/definition/Accounting/employees.yml deleted file mode 100644 index 15a0cdb68..000000000 --- a/.mock/definition/Accounting/employees.yml +++ /dev/null @@ -1,156 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/employees - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Employee` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: EmployeesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedEmployeeList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: c640b80b-fac9-409f-aa19-1f9221aec445 - remote_id: '11167' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - first_name: John - last_name: Smith - is_contractor: true - employee_number: '325462' - email_address: johnsmith@merge.dev - company: company - status: ACTIVE - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - retrieve: - path: /accounting/v1/employees/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Employee` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: EmployeesRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.Employee - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: c640b80b-fac9-409f-aa19-1f9221aec445 - remote_id: '11167' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - first_name: John - last_name: Smith - is_contractor: true - employee_number: '325462' - email_address: johnsmith@merge.dev - company: company - status: ACTIVE - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/expenses.yml b/.mock/definition/Accounting/expenses.yml deleted file mode 100644 index c039baab8..000000000 --- a/.mock/definition/Accounting/expenses.yml +++ /dev/null @@ -1,798 +0,0 @@ -types: - ExpensesListRequestExpandItem: - enum: - - account - - accounting_period - - company - - contact - - employee - - tracking_categories - source: - openapi: accounting_v3.yml - ExpensesRetrieveRequestExpandItem: - enum: - - account - - accounting_period - - company - - contact - - employee - - tracking_categories - source: - openapi: accounting_v3.yml -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/expenses - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Expense` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: ExpensesListRequest - query-parameters: - company_id: - type: optional - docs: If provided, will only return expenses for this company. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - transaction_date_after: - type: optional - docs: If provided, will only return objects created after this datetime. - transaction_date_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - response: - docs: '' - type: accountingRoot.PaginatedExpenseList - status-code: 200 - examples: - - query-parameters: - company_id: company_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - transaction_date_after: '2024-01-15T09:30:00Z' - transaction_date_before: '2024-01-15T09:30:00Z' - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - transaction_date: '2024-01-15T09:30:00Z' - remote_created_at: '2020-03-31T00:00:00Z' - account: account - contact: contact - total_amount: 10000 - sub_total: 1.1 - total_tax_amount: 1.1 - currency: XUA - exchange_rate: '2.9' - inclusive_of_tax: true - company: company - employee: employee - memo: New employee supplies - lines: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d - net_amount: 25.54 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - employee: 7442f0d5-722d-45bd-b807-6e38489d37fe - account: 2a56344a-a491-11ec-b909-0242ac120002 - contact: c640b80b-fac9-409f-aa19-1f9221aec445 - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - description: MacBook Pro - exchange_rate: '2.9' - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - remote_was_deleted: false - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121223' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d - net_amount: 10 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - account: 2a56344a-a491-11ec-b909-0242ac120002 - description: Desk Lamp - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - remote_was_deleted: true - accounting_period: accounting_period - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - create: - path: /accounting/v1/expenses - method: POST - auth: - - tokenAuth: [] - docs: Creates an `Expense` object with the given values. - source: - openapi: accounting_v3.yml - request: - name: ExpenseEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: accountingRoot.ExpenseRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.ExpenseResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - transaction_date: '2024-01-15T09:30:00Z' - remote_created_at: '2020-03-31T00:00:00Z' - account: account - contact: contact - total_amount: 10000 - sub_total: 1.1 - total_tax_amount: 1.1 - currency: XUA - exchange_rate: '2.9' - inclusive_of_tax: true - company: company - employee: employee - memo: New employee supplies - lines: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d - net_amount: 25.54 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - employee: 7442f0d5-722d-45bd-b807-6e38489d37fe - account: 2a56344a-a491-11ec-b909-0242ac120002 - contact: c640b80b-fac9-409f-aa19-1f9221aec445 - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - description: MacBook Pro - exchange_rate: '2.9' - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - remote_was_deleted: false - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121223' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d - net_amount: 10 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - account: 2a56344a-a491-11ec-b909-0242ac120002 - description: Desk Lamp - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - remote_was_deleted: true - accounting_period: accounting_period - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /accounting/v1/expenses/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Expense` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: ExpensesRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.Expense - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - transaction_date: '2024-01-15T09:30:00Z' - remote_created_at: '2020-03-31T00:00:00Z' - account: account - contact: contact - total_amount: 10000 - sub_total: 1.1 - total_tax_amount: 1.1 - currency: XUA - exchange_rate: '2.9' - inclusive_of_tax: true - company: company - employee: employee - memo: New employee supplies - lines: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d - net_amount: 25.54 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - employee: 7442f0d5-722d-45bd-b807-6e38489d37fe - currency: XUA - account: 2a56344a-a491-11ec-b909-0242ac120002 - contact: c640b80b-fac9-409f-aa19-1f9221aec445 - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - description: MacBook Pro - exchange_rate: '2.9' - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - remote_was_deleted: false - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121223' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d - net_amount: 10 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - employee: employee - currency: XUA - account: 2a56344a-a491-11ec-b909-0242ac120002 - contact: contact - project: project - description: Desk Lamp - exchange_rate: '2.9' - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - remote_was_deleted: true - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - remote_was_deleted: true - accounting_period: accounting_period - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - linesRemoteFieldClassesList: - path: /accounting/v1/expenses/lines/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: ExpensesLinesRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - field_choices - metaPostRetrieve: - path: /accounting/v1/expenses/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Expense` POSTs. - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - remoteFieldClassesList: - path: /accounting/v1/expenses/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: ExpensesRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - field_choices - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/fieldMapping.yml b/.mock/definition/Accounting/fieldMapping.yml deleted file mode 100644 index e8c557cdb..000000000 --- a/.mock/definition/Accounting/fieldMapping.yml +++ /dev/null @@ -1,1217 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - field_mappings_retrieve: - path: /accounting/v1/field-mappings - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all Field Mappings for this Linked Account. Field Mappings are - mappings between third-party Remote Fields and user defined Merge - fields. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - source: - openapi: accounting_v3.yml - request: - name: FieldMappingsRetrieveRequest - query-parameters: - exclude_remote_field_metadata: - type: optional - docs: >- - If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and - `remote_fields.schema` will be null). This will increase the speed - of the request since these fields require some calculations. - response: - docs: '' - type: accountingRoot.FieldMappingApiInstanceResponse - status-code: 200 - examples: - - query-parameters: - exclude_remote_field_metadata: true - headers: - X-Account-Token: X-Account-Token - response: - body: - Account: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - AccountingAttachment: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - BalanceSheet: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - CashFlowStatement: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - CompanyInfo: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Contact: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - IncomeStatement: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - CreditNote: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Item: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - PurchaseOrder: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - TrackingCategory: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - JournalEntry: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - TaxRate: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Invoice: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Payment: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Expense: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - VendorCredit: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Transaction: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - AccountingPeriod: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - GeneralLedgerTransaction: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - BankFeedAccount: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Employee: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - PaymentMethod: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Project: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - PaymentTerm: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - field_mappings_create: - path: /accounting/v1/field-mappings - method: POST - auth: - - tokenAuth: [] - docs: >- - Create new Field Mappings that will be available after the next - scheduled sync. This will cause the next sync for this Linked Account to - sync **ALL** data from start. - source: - openapi: accounting_v3.yml - request: - name: CreateFieldMappingRequest - query-parameters: - exclude_remote_field_metadata: - type: optional - docs: >- - If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and - `remote_fields.schema` will be null). This will increase the speed - of the request since these fields require some calculations. - body: - properties: - target_field_name: - type: string - docs: >- - The name of the target field you want this remote field to map - to. - validation: - minLength: 1 - target_field_description: - type: string - docs: >- - The description of the target field you want this remote field - to map to. - validation: - minLength: 1 - remote_field_traversal_path: - docs: >- - The field traversal path of the remote field listed when you hit - the GET /remote-fields endpoint. - type: list - remote_method: - type: string - docs: >- - The method of the remote endpoint where the remote field is - coming from. - validation: - minLength: 1 - remote_url_path: - type: string - docs: >- - The path of the remote endpoint where the remote field is coming - from. - validation: - minLength: 1 - common_model_name: - type: string - docs: >- - The name of the Common Model that the remote field corresponds - to in a given category. - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: accountingRoot.FieldMappingInstanceResponse - status-code: 201 - examples: - - query-parameters: - exclude_remote_field_metadata: true - headers: - X-Account-Token: X-Account-Token - request: - target_field_name: example_target_field_name - target_field_description: this is a example description of the target field - remote_field_traversal_path: - - example_remote_field - remote_method: GET - remote_url_path: /example-url-path - common_model_name: ExampleCommonModel - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - field_mappings_destroy: - path: /accounting/v1/field-mappings/{field_mapping_id} - method: DELETE - auth: - - tokenAuth: [] - docs: >- - Deletes Field Mappings for a Linked Account. All data related to this - Field Mapping will be deleted and these changes will be reflected after - the next scheduled sync. This will cause the next sync for this Linked - Account to sync **ALL** data from start. - source: - openapi: accounting_v3.yml - path-parameters: - field_mapping_id: string - response: - docs: '' - type: accountingRoot.FieldMappingInstanceResponse - status-code: 204 - examples: - - path-parameters: - field_mapping_id: field_mapping_id - headers: - X-Account-Token: X-Account-Token - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - field_mappings_partial_update: - path: /accounting/v1/field-mappings/{field_mapping_id} - method: PATCH - auth: - - tokenAuth: [] - docs: >- - Create or update existing Field Mappings for a Linked Account. Changes - will be reflected after the next scheduled sync. This will cause the - next sync for this Linked Account to sync **ALL** data from start. - source: - openapi: accounting_v3.yml - path-parameters: - field_mapping_id: string - request: - name: PatchedEditFieldMappingRequest - body: - properties: - remote_field_traversal_path: - type: optional> - docs: >- - The field traversal path of the remote field listed when you hit - the GET /remote-fields endpoint. - remote_method: - type: optional - docs: >- - The method of the remote endpoint where the remote field is - coming from. - validation: - minLength: 1 - remote_url_path: - type: optional - docs: >- - The path of the remote endpoint where the remote field is coming - from. - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: accountingRoot.FieldMappingInstanceResponse - status-code: 200 - examples: - - path-parameters: - field_mapping_id: field_mapping_id - headers: - X-Account-Token: X-Account-Token - request: {} - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - remote_fields_retrieve: - path: /accounting/v1/remote-fields - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all remote fields for a Linked Account. Remote fields are - third-party fields that are accessible after initial sync if remote_data - is enabled. You can use remote fields to override existing Merge fields - or map a new Merge field. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - source: - openapi: accounting_v3.yml - request: - name: RemoteFieldsRetrieveRequest - query-parameters: - common_models: - type: optional - docs: >- - A comma seperated list of Common Model names. If included, will - only return Remote Fields for those Common Models. - include_example_values: - type: optional - docs: >- - If true, will include example values, where available, for remote - fields in the 3rd party platform. These examples come from active - data from your customers. - response: - docs: '' - type: accountingRoot.RemoteFieldApiResponse - status-code: 200 - examples: - - query-parameters: - common_models: common_models - include_example_values: include_example_values - headers: - X-Account-Token: X-Account-Token - response: - body: - Account: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - AccountingAttachment: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - BalanceSheet: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - CashFlowStatement: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - CompanyInfo: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Contact: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - IncomeStatement: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - CreditNote: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Item: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - PurchaseOrder: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - TrackingCategory: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - JournalEntry: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - TaxRate: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Invoice: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Payment: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Expense: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - VendorCredit: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Transaction: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - AccountingPeriod: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - GeneralLedgerTransaction: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - BankFeedAccount: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Employee: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - PaymentMethod: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Project: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - PaymentTerm: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - target_fields_retrieve: - path: /accounting/v1/target-fields - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all organization-wide Target Fields, this will not include any - Linked Account specific Target Fields. Organization-wide Target Fields - are additional fields appended to the Merge Common Model for all Linked - Accounts in a category. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.ExternalTargetFieldApiResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - Account: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - AccountingAttachment: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - BalanceSheet: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - CashFlowStatement: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - CompanyInfo: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Contact: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - IncomeStatement: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - CreditNote: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Item: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - PurchaseOrder: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - TrackingCategory: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - JournalEntry: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - TaxRate: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Invoice: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Payment: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Expense: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - VendorCredit: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Transaction: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - AccountingPeriod: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - GeneralLedgerTransaction: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - BankFeedAccount: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Employee: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - PaymentMethod: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Project: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - PaymentTerm: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/forceResync.yml b/.mock/definition/Accounting/forceResync.yml deleted file mode 100644 index b9631fd75..000000000 --- a/.mock/definition/Accounting/forceResync.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - sync_status_resync_create: - path: /accounting/v1/sync-status/resync - method: POST - auth: - - tokenAuth: [] - docs: >- - Force re-sync of all models. This endpoint is available for monthly, - quarterly, and highest sync frequency customers on the Professional or - Enterprise plans. Doing so will consume a sync credit for the relevant - linked account. Force re-syncs can also be triggered manually in the - Merge Dashboard and is available for all customers. - source: - openapi: accounting_v3.yml - response: - docs: '' - type: list - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - - model_name: Invoice - model_id: accounting.Invoices - last_sync_start: '2021-03-30T19:44:18Z' - next_sync_start: '2021-03-30T20:44:18Z' - last_sync_result: SYNCING - last_sync_finished: '2021-03-30T19:55:18Z' - status: SYNCING - is_initial_sync: true - selective_sync_configurations_usage: IN_NEXT_SYNC - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/generalLedgerTransactions.yml b/.mock/definition/Accounting/generalLedgerTransactions.yml deleted file mode 100644 index 12923c804..000000000 --- a/.mock/definition/Accounting/generalLedgerTransactions.yml +++ /dev/null @@ -1,270 +0,0 @@ -types: - GeneralLedgerTransactionsListRequestExpandItem: - enum: - - accounting_period - - company - - general_ledger_transaction_lines - - tracking_categories - source: - openapi: accounting_v3.yml - GeneralLedgerTransactionsRetrieveRequestExpandItem: - enum: - - accounting_period - - company - - general_ledger_transaction_lines - - tracking_categories - source: - openapi: accounting_v3.yml -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/general-ledger-transactions - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `GeneralLedgerTransaction` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: GeneralLedgerTransactionsListRequest - query-parameters: - company_id: - type: optional - docs: >- - If provided, will only return general ledger transactions for this - company. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - posted_date_after: - type: optional - docs: If provided, will only return objects posted after this datetime. - posted_date_before: - type: optional - docs: If provided, will only return objects posted before this datetime. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: accountingRoot.PaginatedGeneralLedgerTransactionList - status-code: 200 - examples: - - query-parameters: - company_id: company_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - posted_date_after: '2024-01-15T09:30:00Z' - posted_date_before: '2024-01-15T09:30:00Z' - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 - remote_id: '987300' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - underlying_transaction_remote_id: '1234' - underlying_transaction_type: INVOICE - accounting_period: accounting_period - company: company - remote_updated_at: '2020-03-31T00:00:00Z' - remote_created_at: '2020-03-31T00:00:00Z' - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - posting_date: '2020-03-31T00:00:00Z' - general_ledger_transaction_lines: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '123' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - account: a47e11b6-c73b-4a0c-be31-130fc48177fa - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - contact: d6e687d6-0c36-48a1-8114-35324b5cb38f - base_currency: USD - transaction_currency: USD - exchange_rate: exchange_rate - description: Invoice created - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - debit_amount: debit_amount - credit_amount: credit_amount - item: a47e11b6-c73b-4a0c-be31-130fc48177fa - foreign_debit_amount: foreign_debit_amount - foreign_credit_amount: foreign_credit_amount - remote_was_deleted: false - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - retrieve: - path: /accounting/v1/general-ledger-transactions/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `GeneralLedgerTransaction` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: GeneralLedgerTransactionsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.GeneralLedgerTransaction - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 - remote_id: '987300' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - underlying_transaction_remote_id: '1234' - underlying_transaction_type: INVOICE - accounting_period: accounting_period - company: company - remote_updated_at: '2020-03-31T00:00:00Z' - remote_created_at: '2020-03-31T00:00:00Z' - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - posting_date: '2020-03-31T00:00:00Z' - general_ledger_transaction_lines: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '123' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - account: a47e11b6-c73b-4a0c-be31-130fc48177fa - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - employee: employee - contact: d6e687d6-0c36-48a1-8114-35324b5cb38f - project: project - base_currency: USD - transaction_currency: USD - exchange_rate: exchange_rate - description: Invoice created - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - debit_amount: debit_amount - credit_amount: credit_amount - item: a47e11b6-c73b-4a0c-be31-130fc48177fa - foreign_debit_amount: foreign_debit_amount - foreign_credit_amount: foreign_credit_amount - remote_was_deleted: false - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - data: - key: value - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/generateKey.yml b/.mock/definition/Accounting/generateKey.yml deleted file mode 100644 index ba16ddeac..000000000 --- a/.mock/definition/Accounting/generateKey.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /accounting/v1/generate-key - method: POST - auth: - - tokenAuth: [] - docs: Create a remote key. - source: - openapi: accounting_v3.yml - request: - name: GenerateRemoteKeyRequest - body: - properties: - name: - type: string - docs: The name of the remote key - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: accountingRoot.RemoteKey - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - name: Remote Deployment Key 1 - response: - body: - name: Remote Deployment Key 1 - key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/incomeStatements.yml b/.mock/definition/Accounting/incomeStatements.yml deleted file mode 100644 index 0c2e79b01..000000000 --- a/.mock/definition/Accounting/incomeStatements.yml +++ /dev/null @@ -1,294 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/income-statements - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `IncomeStatement` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: IncomeStatementsListRequest - query-parameters: - company_id: - type: optional - docs: If provided, will only return income statements for this company. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: accountingRoot.PaginatedIncomeStatementList - status-code: 200 - examples: - - query-parameters: - company_id: company_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: '1342348' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: IncomeStatement - currency: XUA - company: company - start_period: '2024-01-15T09:30:00Z' - end_period: '2024-01-15T09:30:00Z' - income: - - remote_id: '10299' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Total Income - value: 325 - sub_items: - - remote_id: '10200' - name: Landscaping Services - value: 425 - - remote_id: '10201' - name: Pest Control Services - value: -100 - cost_of_sales: - - remote_id: '10299' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Total COGS - value: 25 - sub_items: - - remote_id: '10200' - name: Supplies - value: 10 - gross_profit: 300 - operating_expenses: - - remote_id: '10299' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Total Operating Expenses - value: 100 - sub_items: - - remote_id: '10300' - name: Revenue - San Francisco - value: 500 - - remote_id: '10301' - name: Revenue - New York - value: 500 - net_operating_income: 200 - non_operating_expenses: - - remote_id: '10299' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Total Non-Operating Expenses - value: 100 - sub_items: - - remote_id: '10300' - name: Revenue - San Francisco - value: 500 - - remote_id: '10301' - name: Revenue - New York - value: 500 - net_income: 100 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - retrieve: - path: /accounting/v1/income-statements/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `IncomeStatement` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: IncomeStatementsRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.IncomeStatement - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: '1342348' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: IncomeStatement - currency: XUA - company: company - start_period: '2024-01-15T09:30:00Z' - end_period: '2024-01-15T09:30:00Z' - income: - - remote_id: '10299' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Total Income - value: 325 - sub_items: - - remote_id: '10200' - name: Landscaping Services - value: 425 - - remote_id: '10201' - name: Pest Control Services - value: -100 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - cost_of_sales: - - remote_id: '10299' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Total COGS - value: 25 - sub_items: - - remote_id: '10200' - name: Supplies - value: 10 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - gross_profit: 300 - operating_expenses: - - remote_id: '10299' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Total Operating Expenses - value: 100 - sub_items: - - remote_id: '10300' - name: Revenue - San Francisco - value: 500 - - remote_id: '10301' - name: Revenue - New York - value: 500 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - net_operating_income: 200 - non_operating_expenses: - - remote_id: '10299' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Total Non-Operating Expenses - value: 100 - sub_items: - - remote_id: '10300' - name: Revenue - San Francisco - value: 500 - - remote_id: '10301' - name: Revenue - New York - value: 500 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - net_income: 100 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/invoices.yml b/.mock/definition/Accounting/invoices.yml deleted file mode 100644 index 304889f61..000000000 --- a/.mock/definition/Accounting/invoices.yml +++ /dev/null @@ -1,1270 +0,0 @@ -types: - InvoicesListRequestExpandItem: - enum: - - accounting_period - - applied_credit_notes - - applied_payments - - applied_vendor_credits - - company - - contact - - employee - - line_items - - payment_term - - payments - - purchase_orders - - tracking_categories - source: - openapi: accounting_v3.yml - InvoicesListRequestStatus: - enum: - - DRAFT - - OPEN - - PAID - - PARTIALLY_PAID - - SUBMITTED - - VOID - source: - openapi: accounting_v3.yml - InvoicesListRequestType: - enum: - - ACCOUNTS_PAYABLE - - ACCOUNTS_RECEIVABLE - source: - openapi: accounting_v3.yml - InvoicesRetrieveRequestExpandItem: - enum: - - accounting_period - - applied_credit_notes - - applied_payments - - applied_vendor_credits - - company - - contact - - employee - - line_items - - payment_term - - payments - - purchase_orders - - tracking_categories - source: - openapi: accounting_v3.yml -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/invoices - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Invoice` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: InvoicesListRequest - query-parameters: - company_id: - type: optional - docs: If provided, will only return invoices for this company. - contact_id: - type: optional - docs: If provided, will only return invoices for this contact. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - issue_date_after: - type: optional - docs: If provided, will only return objects created after this datetime. - issue_date_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - number: - type: optional - docs: If provided, will only return Invoices with this number. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - status: - type: optional - docs: |- - If provided, will only return Invoices with this status. - - * `PAID` - PAID - * `DRAFT` - DRAFT - * `SUBMITTED` - SUBMITTED - * `PARTIALLY_PAID` - PARTIALLY_PAID - * `OPEN` - OPEN - * `VOID` - VOID - type: - type: optional - docs: |- - If provided, will only return Invoices with this type. - - * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - response: - docs: '' - type: accountingRoot.PaginatedInvoiceList - status-code: 200 - examples: - - query-parameters: - company_id: company_id - contact_id: contact_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - issue_date_after: '2024-01-15T09:30:00Z' - issue_date_before: '2024-01-15T09:30:00Z' - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - number: number - page_size: 1 - remote_fields: type - remote_id: remote_id - show_enum_origins: type - status: DRAFT - type: ACCOUNTS_PAYABLE - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - remote_id: '990110' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - type: ACCOUNTS_RECEIVABLE - contact: contact - number: AIQ12546 - issue_date: '2020-03-31T00:00:00Z' - due_date: '2020-04-15T00:00:00Z' - paid_on_date: '2020-04-01T00:00:00Z' - memo: Weekly Payment - company: company - employee: employee - currency: XUA - exchange_rate: '2.9' - payment_term: payment_term - total_discount: 1.1 - sub_total: 100 - status: PAID - total_tax_amount: 5 - total_amount: 105 - balance: 105 - remote_updated_at: '2020-04-01T00:00:00Z' - tracking_categories: - - 7dc5ca17-d311-44cd-9ce0-333080367a18 - - 6aa0700c-48e1-4c4a-8162-02e6a582df05 - - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 - accounting_period: accounting_period - purchase_orders: - - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 - - dd70ca2f-b120-46fa-889a-9604037f45fd - - 889b281d-739c-4759-95b8-0aedb3947131 - payments: - - b26fd49a-cbae-470a-a8f8-bcbc119e0390 - applied_payments: - - 9017594e-dc33-4113-a5d2-b0f928e34fdd - line_items: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '8765432' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - description: Pickleball lessons - unit_price: 50 - quantity: 1 - total_amount: 50 - employee: 7442f0d5-722d-45bd-b807-6e38489d37fe - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - contact: 908934-49j9-093f-0989-908923908 - currency: USD - exchange_rate: '2.9' - item: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - account: cd0f32d4-a493-11ec-b909-0242ac120002 - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - applied_credit_notes: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - credit_note: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - applied_vendor_credits: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - vendor_credit: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - inclusive_of_tax: true - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - create: - path: /accounting/v1/invoices - method: POST - auth: - - tokenAuth: [] - docs: |- - Creates an `Invoice` object with the given values. - Including a `PurchaseOrder` id in the `purchase_orders` property will generate an Accounts Payable Invoice from the specified Purchase Order(s). - - source: - openapi: accounting_v3.yml - request: - name: InvoiceEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: accountingRoot.InvoiceRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.InvoiceResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - remote_id: '990110' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - type: ACCOUNTS_RECEIVABLE - contact: contact - number: AIQ12546 - issue_date: '2020-03-31T00:00:00Z' - due_date: '2020-04-15T00:00:00Z' - paid_on_date: '2020-04-01T00:00:00Z' - memo: Weekly Payment - company: company - employee: employee - currency: XUA - exchange_rate: '2.9' - payment_term: payment_term - total_discount: 1.1 - sub_total: 100 - status: PAID - total_tax_amount: 5 - total_amount: 105 - balance: 105 - remote_updated_at: '2020-04-01T00:00:00Z' - tracking_categories: - - 7dc5ca17-d311-44cd-9ce0-333080367a18 - - 6aa0700c-48e1-4c4a-8162-02e6a582df05 - - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 - accounting_period: accounting_period - purchase_orders: - - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 - - dd70ca2f-b120-46fa-889a-9604037f45fd - - 889b281d-739c-4759-95b8-0aedb3947131 - payments: - - b26fd49a-cbae-470a-a8f8-bcbc119e0390 - applied_payments: - - 9017594e-dc33-4113-a5d2-b0f928e34fdd - line_items: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '8765432' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - description: Pickleball lessons - unit_price: 50 - quantity: 1 - total_amount: 50 - employee: 7442f0d5-722d-45bd-b807-6e38489d37fe - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - contact: 908934-49j9-093f-0989-908923908 - currency: USD - exchange_rate: '2.9' - item: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - account: cd0f32d4-a493-11ec-b909-0242ac120002 - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - applied_credit_notes: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - credit_note: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - applied_vendor_credits: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - vendor_credit: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - inclusive_of_tax: true - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /accounting/v1/invoices/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Invoice` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: InvoicesRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: accountingRoot.Invoice - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - remote_fields: type - show_enum_origins: type - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - remote_id: '990110' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - type: ACCOUNTS_RECEIVABLE - contact: contact - number: AIQ12546 - issue_date: '2020-03-31T00:00:00Z' - due_date: '2020-04-15T00:00:00Z' - paid_on_date: '2020-04-01T00:00:00Z' - memo: Weekly Payment - company: company - employee: employee - currency: XUA - exchange_rate: '2.9' - payment_term: payment_term - total_discount: 1.1 - sub_total: 100 - status: PAID - total_tax_amount: 5 - total_amount: 105 - balance: 105 - remote_updated_at: '2020-04-01T00:00:00Z' - tracking_categories: - - 7dc5ca17-d311-44cd-9ce0-333080367a18 - - 6aa0700c-48e1-4c4a-8162-02e6a582df05 - - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 - accounting_period: accounting_period - purchase_orders: - - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 - - dd70ca2f-b120-46fa-889a-9604037f45fd - - 889b281d-739c-4759-95b8-0aedb3947131 - payments: - - b26fd49a-cbae-470a-a8f8-bcbc119e0390 - applied_payments: - - 9017594e-dc33-4113-a5d2-b0f928e34fdd - line_items: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '8765432' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - description: Pickleball lessons - unit_price: 50 - quantity: 1 - total_amount: 50 - employee: 7442f0d5-722d-45bd-b807-6e38489d37fe - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - contact: 908934-49j9-093f-0989-908923908 - currency: USD - exchange_rate: '2.9' - item: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - account: cd0f32d4-a493-11ec-b909-0242ac120002 - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_fields: - - remote_field_class: remote_field_class - applied_credit_notes: - - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - credit_note: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - remote_was_deleted: true - applied_vendor_credits: - - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - vendor_credit: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - remote_was_deleted: true - inclusive_of_tax: true - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - partialUpdate: - path: /accounting/v1/invoices/{id} - method: PATCH - auth: - - tokenAuth: [] - docs: Updates an `Invoice` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: PatchedInvoiceEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: accountingRoot.InvoiceRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.InvoiceResponse - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 - remote_id: '990110' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - type: ACCOUNTS_RECEIVABLE - contact: contact - number: AIQ12546 - issue_date: '2020-03-31T00:00:00Z' - due_date: '2020-04-15T00:00:00Z' - paid_on_date: '2020-04-01T00:00:00Z' - memo: Weekly Payment - company: company - employee: employee - currency: XUA - exchange_rate: '2.9' - payment_term: payment_term - total_discount: 1.1 - sub_total: 100 - status: PAID - total_tax_amount: 5 - total_amount: 105 - balance: 105 - remote_updated_at: '2020-04-01T00:00:00Z' - tracking_categories: - - 7dc5ca17-d311-44cd-9ce0-333080367a18 - - 6aa0700c-48e1-4c4a-8162-02e6a582df05 - - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 - accounting_period: accounting_period - purchase_orders: - - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 - - dd70ca2f-b120-46fa-889a-9604037f45fd - - 889b281d-739c-4759-95b8-0aedb3947131 - payments: - - b26fd49a-cbae-470a-a8f8-bcbc119e0390 - applied_payments: - - 9017594e-dc33-4113-a5d2-b0f928e34fdd - line_items: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '8765432' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - description: Pickleball lessons - unit_price: 50 - quantity: 1 - total_amount: 50 - employee: 7442f0d5-722d-45bd-b807-6e38489d37fe - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - contact: 908934-49j9-093f-0989-908923908 - currency: USD - exchange_rate: '2.9' - item: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - account: cd0f32d4-a493-11ec-b909-0242ac120002 - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - applied_credit_notes: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - credit_note: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - applied_vendor_credits: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - vendor_credit: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - inclusive_of_tax: true - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - lineItemsRemoteFieldClassesList: - path: /accounting/v1/invoices/line-items/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: InvoicesLineItemsRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - field_choices - metaPatchRetrieve: - path: /accounting/v1/invoices/meta/patch/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Invoice` PATCHs. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - response: - docs: '' - type: accountingRoot.MetaResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - metaPostRetrieve: - path: /accounting/v1/invoices/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Invoice` POSTs. - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - remoteFieldClassesList: - path: /accounting/v1/invoices/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: InvoicesRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - field_choices - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/issues.yml b/.mock/definition/Accounting/issues.yml deleted file mode 100644 index 01dadddb0..000000000 --- a/.mock/definition/Accounting/issues.yml +++ /dev/null @@ -1,154 +0,0 @@ -types: - IssuesListRequestStatus: - enum: - - ONGOING - - RESOLVED - source: - openapi: accounting_v3.yml -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/issues - method: GET - auth: - - tokenAuth: [] - docs: Gets all issues for Organization. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: IssuesListRequest - query-parameters: - account_token: optional - cursor: - type: optional - docs: The pagination cursor value. - end_date: - type: optional - docs: >- - If included, will only include issues whose most recent action - occurred before this time - end_user_organization_name: optional - first_incident_time_after: - type: optional - docs: >- - If provided, will only return issues whose first incident time was - after this datetime. - first_incident_time_before: - type: optional - docs: >- - If provided, will only return issues whose first incident time was - before this datetime. - include_muted: - type: optional - docs: If true, will include muted issues - integration_name: optional - last_incident_time_after: - type: optional - docs: >- - If provided, will only return issues whose last incident time was - after this datetime. - last_incident_time_before: - type: optional - docs: >- - If provided, will only return issues whose last incident time was - before this datetime. - linked_account_id: - type: optional - docs: >- - If provided, will only include issues pertaining to the linked - account passed in. - page_size: - type: optional - docs: Number of results to return per page. - start_date: - type: optional - docs: >- - If included, will only include issues whose most recent action - occurred after this time - status: - type: optional - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - response: - docs: '' - type: accountingRoot.PaginatedIssueList - status-code: 200 - examples: - - query-parameters: - account_token: account_token - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_date: end_date - end_user_organization_name: end_user_organization_name - first_incident_time_after: '2024-01-15T09:30:00Z' - first_incident_time_before: '2024-01-15T09:30:00Z' - include_muted: include_muted - integration_name: integration_name - last_incident_time_after: '2024-01-15T09:30:00Z' - last_incident_time_before: '2024-01-15T09:30:00Z' - linked_account_id: linked_account_id - page_size: 1 - start_date: start_date - status: ONGOING - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: ONGOING - error_description: Missing Permissions - end_user: - key: value - first_incident_time: '2022-12-05T16:19:15Z' - last_incident_time: '2022-12-05T16:19:15Z' - is_muted: true - error_details: - - Missing employee permissions. - - Missing time off permissions. - retrieve: - path: /accounting/v1/issues/{id} - method: GET - auth: - - tokenAuth: [] - docs: Get a specific issue. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - response: - docs: '' - type: accountingRoot.Issue - status-code: 200 - examples: - - path-parameters: - id: id - headers: - X-Account-Token: '[object Object]' - response: - body: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: ONGOING - error_description: Missing Permissions - end_user: - key: value - first_incident_time: '2022-12-05T16:19:15Z' - last_incident_time: '2022-12-05T16:19:15Z' - is_muted: true - error_details: - - Missing employee permissions. - - Missing time off permissions. - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/items.yml b/.mock/definition/Accounting/items.yml deleted file mode 100644 index 81d180fe8..000000000 --- a/.mock/definition/Accounting/items.yml +++ /dev/null @@ -1,783 +0,0 @@ -types: - ItemsListRequestExpandItem: - enum: - - company - - purchase_account - - purchase_tax_rate - - sales_account - - sales_tax_rate - source: - openapi: accounting_v3.yml - ItemsRetrieveRequestExpandItem: - enum: - - company - - purchase_account - - purchase_tax_rate - - sales_account - - sales_tax_rate - source: - openapi: accounting_v3.yml -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/items - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Item` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: ItemsListRequest - query-parameters: - company_id: - type: optional - docs: If provided, will only return items for this company. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: accountingRoot.PaginatedItemList - status-code: 200 - examples: - - query-parameters: - company_id: company_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_fields: status - remote_id: remote_id - show_enum_origins: status - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: d2f972d0-2526-434b-9409-4c3b468e08f0 - remote_id: '12374' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Pickleball Paddle - status: ACTIVE - type: INVENTORY - unit_price: 10 - purchase_price: 25 - purchase_account: purchase_account - sales_account: sales_account - company: company - purchase_tax_rate: purchase_tax_rate - sales_tax_rate: sales_tax_rate - remote_updated_at: '2020-03-31T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - create: - path: /accounting/v1/items - method: POST - auth: - - tokenAuth: [] - docs: Creates an `Item` object with the given values. - source: - openapi: accounting_v3.yml - request: - name: ItemEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: accountingRoot.ItemRequestRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.ItemResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: d2f972d0-2526-434b-9409-4c3b468e08f0 - remote_id: '12374' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Pickleball Paddle - status: ACTIVE - type: INVENTORY - unit_price: 10 - purchase_price: 25 - purchase_account: purchase_account - sales_account: sales_account - company: company - purchase_tax_rate: purchase_tax_rate - sales_tax_rate: sales_tax_rate - remote_updated_at: '2020-03-31T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /accounting/v1/items/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Item` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: ItemsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: accountingRoot.Item - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: status - show_enum_origins: status - headers: - X-Account-Token: X-Account-Token - response: - body: - id: d2f972d0-2526-434b-9409-4c3b468e08f0 - remote_id: '12374' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Pickleball Paddle - status: ACTIVE - type: INVENTORY - unit_price: 10 - purchase_price: 25 - purchase_account: purchase_account - sales_account: sales_account - company: company - purchase_tax_rate: purchase_tax_rate - sales_tax_rate: sales_tax_rate - remote_updated_at: '2020-03-31T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - partialUpdate: - path: /accounting/v1/items/{id} - method: PATCH - auth: - - tokenAuth: [] - docs: Updates an `Item` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: PatchedItemEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: accountingRoot.PatchedItemRequestRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.ItemResponse - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: d2f972d0-2526-434b-9409-4c3b468e08f0 - remote_id: '12374' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Pickleball Paddle - status: ACTIVE - type: INVENTORY - unit_price: 10 - purchase_price: 25 - purchase_account: purchase_account - sales_account: sales_account - company: company - purchase_tax_rate: purchase_tax_rate - sales_tax_rate: sales_tax_rate - remote_updated_at: '2020-03-31T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - metaPatchRetrieve: - path: /accounting/v1/items/meta/patch/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Item` PATCHs. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - response: - docs: '' - type: accountingRoot.MetaResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - metaPostRetrieve: - path: /accounting/v1/items/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Item` POSTs. - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/journalEntries.yml b/.mock/definition/Accounting/journalEntries.yml deleted file mode 100644 index de400100f..000000000 --- a/.mock/definition/Accounting/journalEntries.yml +++ /dev/null @@ -1,789 +0,0 @@ -types: - JournalEntriesListRequestExpandItem: - enum: - - accounting_period - - applied_payments - - company - - lines - - payments - - tracking_categories - source: - openapi: accounting_v3.yml - JournalEntriesRetrieveRequestExpandItem: - enum: - - accounting_period - - applied_payments - - company - - lines - - payments - - tracking_categories - source: - openapi: accounting_v3.yml -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/journal-entries - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `JournalEntry` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: JournalEntriesListRequest - query-parameters: - company_id: - type: optional - docs: If provided, will only return journal entries for this company. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - transaction_date_after: - type: optional - docs: If provided, will only return objects created after this datetime. - transaction_date_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - response: - docs: '' - type: accountingRoot.PaginatedJournalEntryList - status-code: 200 - examples: - - query-parameters: - company_id: company_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - transaction_date_after: '2024-01-15T09:30:00Z' - transaction_date_before: '2024-01-15T09:30:00Z' - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - transaction_date: '2020-03-31T00:00:00Z' - payments: - - b26fd49a-cbae-470a-a8f8-bcbc119e0390 - applied_payments: - - 4311155d-f236-4a5d-9e0f-1cb167e38f95 - memo: Weekly Payment - currency: XUA - exchange_rate: '2.9' - company: company - inclusive_of_tax: true - lines: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - net_amount: 25.54 - tracking_categories: - - d25d609b-945f-4762-b55a-1c8fb220c43c - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - employee: 123c8r35-5kf5-12x5-r833-99bwf35210b5 - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - contact: d2d5ea3c-b032-11ec-b909-0242ac120002 - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - description: Cash payment for lunch - exchange_rate: '2.9' - remote_was_deleted: false - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121223' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - account: f963f34d-3d2f-4f77-b557-cf36bc7e6498 - net_amount: 10 - journal_number: '42' - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - remote_was_deleted: true - posting_status: UNPOSTED - accounting_period: accounting_period - remote_created_at: '2020-03-31T00:00:00Z' - remote_updated_at: '2020-03-31T00:00:00Z' - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - create: - path: /accounting/v1/journal-entries - method: POST - auth: - - tokenAuth: [] - docs: Creates a `JournalEntry` object with the given values. - source: - openapi: accounting_v3.yml - request: - name: JournalEntryEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: accountingRoot.JournalEntryRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.JournalEntryResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - transaction_date: '2020-03-31T00:00:00Z' - payments: - - b26fd49a-cbae-470a-a8f8-bcbc119e0390 - applied_payments: - - 4311155d-f236-4a5d-9e0f-1cb167e38f95 - memo: Weekly Payment - currency: XUA - exchange_rate: '2.9' - company: company - inclusive_of_tax: true - lines: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - net_amount: 25.54 - tracking_categories: - - d25d609b-945f-4762-b55a-1c8fb220c43c - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - employee: 123c8r35-5kf5-12x5-r833-99bwf35210b5 - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - contact: d2d5ea3c-b032-11ec-b909-0242ac120002 - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - description: Cash payment for lunch - exchange_rate: '2.9' - remote_was_deleted: false - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121223' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - account: f963f34d-3d2f-4f77-b557-cf36bc7e6498 - net_amount: 10 - journal_number: '42' - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - remote_was_deleted: true - posting_status: UNPOSTED - accounting_period: accounting_period - remote_created_at: '2020-03-31T00:00:00Z' - remote_updated_at: '2020-03-31T00:00:00Z' - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /accounting/v1/journal-entries/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `JournalEntry` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: JournalEntriesRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.JournalEntry - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - transaction_date: '2020-03-31T00:00:00Z' - payments: - - b26fd49a-cbae-470a-a8f8-bcbc119e0390 - applied_payments: - - 4311155d-f236-4a5d-9e0f-1cb167e38f95 - memo: Weekly Payment - currency: XUA - exchange_rate: '2.9' - company: company - inclusive_of_tax: true - lines: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - net_amount: 25.54 - tracking_categories: - - d25d609b-945f-4762-b55a-1c8fb220c43c - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - currency: XUA - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - employee: 123c8r35-5kf5-12x5-r833-99bwf35210b5 - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - contact: d2d5ea3c-b032-11ec-b909-0242ac120002 - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - description: Cash payment for lunch - exchange_rate: '2.9' - remote_was_deleted: false - remote_fields: - - remote_field_class: remote_field_class - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121223' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - account: f963f34d-3d2f-4f77-b557-cf36bc7e6498 - net_amount: 10 - tracking_categories: - - d25d609b-945f-4762-b55a-1c8fb220c43c - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - currency: XUA - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - employee: 123c8r35-5kf5-12x5-r833-99bwf35210b5 - project: project - contact: d2d5ea3c-b032-11ec-b909-0242ac120002 - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - description: Cash payment for lunch - exchange_rate: '2.9' - remote_was_deleted: true - remote_fields: - - remote_field_class: remote_field_class - journal_number: '42' - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - remote_was_deleted: true - posting_status: UNPOSTED - accounting_period: accounting_period - remote_created_at: '2020-03-31T00:00:00Z' - remote_updated_at: '2020-03-31T00:00:00Z' - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - linesRemoteFieldClassesList: - path: /accounting/v1/journal-entries/lines/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: JournalEntriesLinesRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - field_choices - metaPostRetrieve: - path: /accounting/v1/journal-entries/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `JournalEntry` POSTs. - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - remoteFieldClassesList: - path: /accounting/v1/journal-entries/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: JournalEntriesRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - field_choices - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/linkToken.yml b/.mock/definition/Accounting/linkToken.yml deleted file mode 100644 index 4d3d29cdf..000000000 --- a/.mock/definition/Accounting/linkToken.yml +++ /dev/null @@ -1,155 +0,0 @@ -imports: - accountingRoot: __package__.yml -types: - EndUserDetailsRequestLanguage: - discriminated: false - docs: >- - The following subset of IETF language tags can be used to configure - localization. - - - * `en` - en - - * `de` - de - union: - - accountingRoot.LanguageEnum - - string - source: - openapi: accounting_v3.yml - inline: true -service: - auth: false - base-path: '' - endpoints: - create: - path: /accounting/v1/link-token - method: POST - auth: - - tokenAuth: [] - docs: Creates a link token to be used when linking a new end user. - source: - openapi: accounting_v3.yml - request: - name: EndUserDetailsRequest - body: - properties: - end_user_email_address: - type: string - docs: >- - Your end user's email address. This is purely for identification - purposes - setting this value will not cause any emails to be - sent. - validation: - minLength: 1 - maxLength: 100 - end_user_organization_name: - type: string - docs: Your end user's organization. - validation: - minLength: 1 - maxLength: 100 - end_user_origin_id: - type: string - docs: >- - This unique identifier typically represents the ID for your end - user in your product's database. This value must be distinct - from other Linked Accounts' unique identifiers. - validation: - minLength: 1 - maxLength: 100 - categories: - docs: The integration categories to show in Merge Link. - type: list - integration: - type: optional - docs: >- - The slug of a specific pre-selected integration for this linking - flow token. For examples of slugs, see - https://docs.merge.dev/guides/merge-link/single-integration/. - validation: - minLength: 1 - link_expiry_mins: - type: optional - docs: >- - An integer number of minutes between [30, 720 or 10080 if for a - Magic Link URL] for how long this token is valid. Defaults to - 30. - default: 30 - validation: - min: 30 - max: 10080 - should_create_magic_link_url: - type: optional - docs: >- - Whether to generate a Magic Link URL. Defaults to false. For - more information on Magic Link, see - https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - default: false - hide_admin_magic_link: - type: optional - docs: >- - Whether to generate a Magic Link URL on the Admin Needed screen - during the linking flow. Defaults to false. For more information - on Magic Link, see - https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - default: false - common_models: - type: optional> - docs: >- - An array of objects to specify the models and fields that will - be disabled for a given Linked Account. Each object uses - model_id, enabled_actions, and disabled_fields to specify the - model, method, and fields that are scoped for a given Linked - Account. - category_common_model_scopes: - type: >- - optional>>> - docs: >- - When creating a Link Token, you can set permissions for Common - Models that will apply to the account that is going to be - linked. Any model or field not specified in link token payload - will default to existing settings. - language: - type: optional - docs: >- - The following subset of IETF language tags can be used to - configure localization. - - - * `en` - en - - * `de` - de - are_syncs_disabled: - type: optional - docs: >- - The boolean that indicates whether initial, periodic, and force - syncs will be disabled. - default: false - integration_specific_config: - type: optional> - docs: >- - A JSON object containing integration-specific configuration - options. - content-type: application/json - response: - docs: '' - type: accountingRoot.LinkToken - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - end_user_email_address: example@gmail.com - end_user_organization_name: Test Organization - end_user_origin_id: '12345' - categories: - - hris - - ats - response: - body: - link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 - integration_name: Lever - magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/linkedAccounts.yml b/.mock/definition/Accounting/linkedAccounts.yml deleted file mode 100644 index b3382911a..000000000 --- a/.mock/definition/Accounting/linkedAccounts.yml +++ /dev/null @@ -1,169 +0,0 @@ -types: - LinkedAccountsListRequestCategory: - enum: - - accounting - - ats - - crm - - filestorage - - hris - - mktg - - ticketing - source: - openapi: accounting_v3.yml -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/linked-accounts - method: GET - auth: - - tokenAuth: [] - docs: List linked accounts for your organization. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: LinkedAccountsListRequest - query-parameters: - category: - type: optional - docs: >- - Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, - `mktg`, `ticketing` - - - * `hris` - hris - - * `ats` - ats - - * `accounting` - accounting - - * `ticketing` - ticketing - - * `crm` - crm - - * `mktg` - mktg - - * `filestorage` - filestorage - cursor: - type: optional - docs: The pagination cursor value. - end_user_email_address: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given email address. - end_user_organization_name: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given organization name. - end_user_origin_id: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given origin ID. - end_user_origin_ids: - type: optional - docs: >- - Comma-separated list of EndUser origin IDs, making it possible to - specify multiple EndUsers at once. - id: - type: optional - validation: - format: uuid - ids: - type: optional - docs: >- - Comma-separated list of LinkedAccount IDs, making it possible to - specify multiple LinkedAccounts at once. - include_duplicates: - type: optional - docs: >- - If `true`, will include complete production duplicates of the - account specified by the `id` query parameter in the response. - `id` must be for a complete production linked account. - integration_name: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given integration name. - is_test_account: - type: optional - docs: >- - If included, will only include test linked accounts. If not - included, will only include non-test linked accounts. - page_size: - type: optional - docs: Number of results to return per page. - status: - type: optional - docs: >- - Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, - `RELINK_NEEDED` - response: - docs: '' - type: accountingRoot.PaginatedAccountDetailsAndActionsList - status-code: 200 - examples: - - query-parameters: - category: accounting - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_user_email_address: end_user_email_address - end_user_organization_name: end_user_organization_name - end_user_origin_id: end_user_origin_id - end_user_origin_ids: end_user_origin_ids - id: id - ids: ids - include_duplicates: true - integration_name: integration_name - is_test_account: is_test_account - page_size: 1 - status: status - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: e59b1821-f85c-4e28-a6b3-1804156f3563 - category: hris - status: COMPLETE - status_detail: Invalid login credentials - end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d - end_user_organization_name: Foo Bar, LLC - end_user_email_address: hradmin@foobar.dev - subdomain: foobar - webhook_listener_url: >- - https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: true - integration: - name: name - categories: - - hris - color: color - slug: slug - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - account_type: PRODUCTION - completed_at: '2024-08-26T20:11:19Z' - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/passthrough.yml b/.mock/definition/Accounting/passthrough.yml deleted file mode 100644 index 5815ec9d1..000000000 --- a/.mock/definition/Accounting/passthrough.yml +++ /dev/null @@ -1,42 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /accounting/v1/passthrough - method: POST - auth: - - tokenAuth: [] - docs: Pull data from an endpoint not currently supported by Merge. - source: - openapi: accounting_v3.yml - request: - body: accountingRoot.DataPassthroughRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.RemoteResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - method: GET - path: /scooters - response: - body: - method: GET - path: /scooters - status: 200 - response: - key: value - response_headers: - X-Page-Token: value - response_type: JSON - headers: - EXTRA-HEADER: value - Authorization: - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/paymentMethods.yml b/.mock/definition/Accounting/paymentMethods.yml deleted file mode 100644 index 8d1a36848..000000000 --- a/.mock/definition/Accounting/paymentMethods.yml +++ /dev/null @@ -1,136 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/payment-methods - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `PaymentMethod` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: PaymentMethodsListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedPaymentMethodList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - method_type: CREDIT_CARD - name: John Smith's Credit Card - is_active: true - remote_updated_at: '2021-09-15T00:00:00Z' - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - retrieve: - path: /accounting/v1/payment-methods/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `PaymentMethod` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: PaymentMethodsRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.PaymentMethod - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - method_type: CREDIT_CARD - name: John Smith's Credit Card - is_active: true - remote_updated_at: '2021-09-15T00:00:00Z' - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/paymentTerms.yml b/.mock/definition/Accounting/paymentTerms.yml deleted file mode 100644 index f1f342931..000000000 --- a/.mock/definition/Accounting/paymentTerms.yml +++ /dev/null @@ -1,152 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/payment-terms - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `PaymentTerm` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: PaymentTermsListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedPaymentTermList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Net 30 - is_active: true - company: company - days_until_due: 30 - discount_days: 15 - remote_last_modified_at: '2024-10-16T00:00:00Z' - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - retrieve: - path: /accounting/v1/payment-terms/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `PaymentTerm` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: PaymentTermsRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.PaymentTerm - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Net 30 - is_active: true - company: company - days_until_due: 30 - discount_days: 15 - remote_last_modified_at: '2024-10-16T00:00:00Z' - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/payments.yml b/.mock/definition/Accounting/payments.yml deleted file mode 100644 index 2bd53ed62..000000000 --- a/.mock/definition/Accounting/payments.yml +++ /dev/null @@ -1,1045 +0,0 @@ -types: - PaymentsListRequestExpandItem: - enum: - - account - - accounting_period - - applied_to_lines - - company - - contact - - payment_method - - tracking_categories - source: - openapi: accounting_v3.yml - PaymentsRetrieveRequestExpandItem: - enum: - - account - - accounting_period - - applied_to_lines - - company - - contact - - payment_method - - tracking_categories - source: - openapi: accounting_v3.yml -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/payments - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Payment` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: PaymentsListRequest - query-parameters: - account_id: - type: optional - docs: If provided, will only return payments for this account. - company_id: - type: optional - docs: If provided, will only return payments for this company. - contact_id: - type: optional - docs: If provided, will only return payments for this contact. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - transaction_date_after: - type: optional - docs: If provided, will only return objects created after this datetime. - transaction_date_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - response: - docs: '' - type: accountingRoot.PaginatedPaymentList - status-code: 200 - examples: - - query-parameters: - account_id: account_id - company_id: company_id - contact_id: contact_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - transaction_date_after: '2024-01-15T09:30:00Z' - transaction_date_before: '2024-01-15T09:30:00Z' - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 - remote_id: '987300' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - transaction_date: '2020-03-31T00:00:00Z' - contact: contact - account: account - payment_method: payment_method - currency: XUA - exchange_rate: '2.9' - company: company - total_amount: 50 - type: ACCOUNTS_PAYABLE - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - accounting_period: accounting_period - applied_to_lines: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '234' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - applied_amount: '25' - applied_date: '2020-03-31T00:00:00Z' - related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa - related_object_type: INVOICE - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '235' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - applied_amount: '25' - applied_date: '2020-03-31T00:00:00Z' - related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 - related_object_type: CREDIT_NOTE - remote_updated_at: '2020-03-31T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - create: - path: /accounting/v1/payments - method: POST - auth: - - tokenAuth: [] - docs: Creates a `Payment` object with the given values. - source: - openapi: accounting_v3.yml - request: - name: PaymentEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: accountingRoot.PaymentRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.PaymentResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 - remote_id: '987300' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - transaction_date: '2020-03-31T00:00:00Z' - contact: contact - account: account - payment_method: payment_method - currency: XUA - exchange_rate: '2.9' - company: company - total_amount: 50 - type: ACCOUNTS_PAYABLE - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - accounting_period: accounting_period - applied_to_lines: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '234' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - applied_amount: '25' - applied_date: '2020-03-31T00:00:00Z' - related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa - related_object_type: INVOICE - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '235' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - applied_amount: '25' - applied_date: '2020-03-31T00:00:00Z' - related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 - related_object_type: CREDIT_NOTE - remote_updated_at: '2020-03-31T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /accounting/v1/payments/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Payment` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: PaymentsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.Payment - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 - remote_id: '987300' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - transaction_date: '2020-03-31T00:00:00Z' - contact: contact - account: account - payment_method: payment_method - currency: XUA - exchange_rate: '2.9' - company: company - total_amount: 50 - type: ACCOUNTS_PAYABLE - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - accounting_period: accounting_period - applied_to_lines: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '234' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - applied_amount: '25' - applied_date: '2020-03-31T00:00:00Z' - related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa - related_object_type: INVOICE - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '235' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - applied_amount: '25' - applied_date: '2020-03-31T00:00:00Z' - related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 - related_object_type: CREDIT_NOTE - remote_updated_at: '2020-03-31T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - partialUpdate: - path: /accounting/v1/payments/{id} - method: PATCH - auth: - - tokenAuth: [] - docs: Updates a `Payment` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: PatchedPaymentEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: accountingRoot.PatchedPaymentRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.PaymentResponse - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 - remote_id: '987300' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - transaction_date: '2020-03-31T00:00:00Z' - contact: contact - account: account - payment_method: payment_method - currency: XUA - exchange_rate: '2.9' - company: company - total_amount: 50 - type: ACCOUNTS_PAYABLE - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - accounting_period: accounting_period - applied_to_lines: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '234' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - applied_amount: '25' - applied_date: '2020-03-31T00:00:00Z' - related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa - related_object_type: INVOICE - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '235' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - applied_amount: '25' - applied_date: '2020-03-31T00:00:00Z' - related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 - related_object_type: CREDIT_NOTE - remote_updated_at: '2020-03-31T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - lineItemsRemoteFieldClassesList: - path: /accounting/v1/payments/line-items/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: PaymentsLineItemsRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - field_choices - metaPatchRetrieve: - path: /accounting/v1/payments/meta/patch/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Payment` PATCHs. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - response: - docs: '' - type: accountingRoot.MetaResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - metaPostRetrieve: - path: /accounting/v1/payments/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Payment` POSTs. - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - remoteFieldClassesList: - path: /accounting/v1/payments/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: PaymentsRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - field_choices - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/phoneNumbers.yml b/.mock/definition/Accounting/phoneNumbers.yml deleted file mode 100644 index d5d8e3d13..000000000 --- a/.mock/definition/Accounting/phoneNumbers.yml +++ /dev/null @@ -1,49 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /accounting/v1/phone-numbers/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `AccountingPhoneNumber` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: PhoneNumbersRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.AccountingPhoneNumber - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - number: '+3198675309' - type: Mobile - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/projects.yml b/.mock/definition/Accounting/projects.yml deleted file mode 100644 index b4c587c2a..000000000 --- a/.mock/definition/Accounting/projects.yml +++ /dev/null @@ -1,157 +0,0 @@ -types: - ProjectsListRequestExpandItem: - enum: - - company - - contact - source: - openapi: accounting_v3.yml - ProjectsRetrieveRequestExpandItem: - enum: - - company - - contact - source: - openapi: accounting_v3.yml -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/projects - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Project` objects. - source: - openapi: accounting_v3.yml - request: - name: ProjectsListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedProjectList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Permissions Mapping - is_active: true - company: company - contact: contact - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - retrieve: - path: /accounting/v1/projects/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Project` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: ProjectsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.Project - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Permissions Mapping - is_active: true - company: company - contact: contact - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/purchaseOrders.yml b/.mock/definition/Accounting/purchaseOrders.yml deleted file mode 100644 index 54247abdb..000000000 --- a/.mock/definition/Accounting/purchaseOrders.yml +++ /dev/null @@ -1,839 +0,0 @@ -types: - PurchaseOrdersListRequestExpandItem: - enum: - - accounting_period - - company - - delivery_address - - line_items - - payment_term - - tracking_categories - - vendor - source: - openapi: accounting_v3.yml - PurchaseOrdersRetrieveRequestExpandItem: - enum: - - accounting_period - - company - - delivery_address - - line_items - - payment_term - - tracking_categories - - vendor - source: - openapi: accounting_v3.yml -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/purchase-orders - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `PurchaseOrder` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: PurchaseOrdersListRequest - query-parameters: - company_id: - type: optional - docs: If provided, will only return purchase orders for this company. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - issue_date_after: - type: optional - docs: If provided, will only return objects created after this datetime. - issue_date_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: accountingRoot.PaginatedPurchaseOrderList - status-code: 200 - examples: - - query-parameters: - company_id: company_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - issue_date_after: '2024-01-15T09:30:00Z' - issue_date_before: '2024-01-15T09:30:00Z' - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_fields: status - remote_id: remote_id - show_enum_origins: status - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 0048ea5b-911e-4dff-9364-92070dea62ff - remote_id: '239741' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - status: DRAFT - issue_date: '2020-03-31T00:00:00Z' - purchase_order_number: PO1234 - delivery_date: '2020-04-15T00:00:00Z' - delivery_address: delivery_address - customer: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 - vendor: vendor - memo: private note - company: company - total_amount: 260 - currency: XUA - exchange_rate: '2.9' - payment_term: payment_term - line_items: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - description: Pickleball paddles - unit_price: 25 - quantity: 10 - item: 0958cbc6-6040-430a-848e-aafacbadf4ae - tracking_categories: - - f1214c24-2702-4617-b74b-3ddecfc0d384 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - tax_amount: tax_amount - total_line_amount: total_line_amount - currency: USD - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - exchange_rate: '2.9' - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: false - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - description: Pickleball Balls - unit_price: 1 - quantity: 10 - item: 249c9faa-3045-4a31-953b-8f22d3613301 - tracking_categories: - - f1214c24-2702-4617-b74b-3ddecfc0d384 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - tax_amount: tax_amount - total_line_amount: total_line_amount - inclusive_of_tax: true - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - accounting_period: accounting_period - remote_created_at: '2020-03-31T00:00:00Z' - remote_updated_at: '2020-03-31T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - create: - path: /accounting/v1/purchase-orders - method: POST - auth: - - tokenAuth: [] - docs: Creates a `PurchaseOrder` object with the given values. - source: - openapi: accounting_v3.yml - request: - name: PurchaseOrderEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: accountingRoot.PurchaseOrderRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.PurchaseOrderResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 0048ea5b-911e-4dff-9364-92070dea62ff - remote_id: '239741' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - status: DRAFT - issue_date: '2020-03-31T00:00:00Z' - purchase_order_number: PO1234 - delivery_date: '2020-04-15T00:00:00Z' - delivery_address: delivery_address - customer: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 - vendor: vendor - memo: private note - company: company - total_amount: 260 - currency: XUA - exchange_rate: '2.9' - payment_term: payment_term - line_items: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - description: Pickleball paddles - unit_price: 25 - quantity: 10 - item: 0958cbc6-6040-430a-848e-aafacbadf4ae - tracking_categories: - - f1214c24-2702-4617-b74b-3ddecfc0d384 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - tax_amount: tax_amount - total_line_amount: total_line_amount - currency: USD - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - exchange_rate: '2.9' - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: false - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - description: Pickleball Balls - unit_price: 1 - quantity: 10 - item: 249c9faa-3045-4a31-953b-8f22d3613301 - tracking_categories: - - f1214c24-2702-4617-b74b-3ddecfc0d384 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - tax_amount: tax_amount - total_line_amount: total_line_amount - inclusive_of_tax: true - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - accounting_period: accounting_period - remote_created_at: '2020-03-31T00:00:00Z' - remote_updated_at: '2020-03-31T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /accounting/v1/purchase-orders/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `PurchaseOrder` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: PurchaseOrdersRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: accountingRoot.PurchaseOrder - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - remote_fields: status - show_enum_origins: status - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 0048ea5b-911e-4dff-9364-92070dea62ff - remote_id: '239741' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - status: DRAFT - issue_date: '2020-03-31T00:00:00Z' - purchase_order_number: PO1234 - delivery_date: '2020-04-15T00:00:00Z' - delivery_address: delivery_address - customer: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 - vendor: vendor - memo: private note - company: company - total_amount: 260 - currency: XUA - exchange_rate: '2.9' - payment_term: payment_term - line_items: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - description: Pickleball paddles - unit_price: 25 - quantity: 10 - item: 0958cbc6-6040-430a-848e-aafacbadf4ae - account: account - tracking_categories: - - f1214c24-2702-4617-b74b-3ddecfc0d384 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - tax_amount: tax_amount - total_line_amount: total_line_amount - currency: USD - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - exchange_rate: '2.9' - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: false - remote_fields: - - remote_field_class: remote_field_class - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - description: Pickleball Balls - unit_price: 1 - quantity: 10 - item: 249c9faa-3045-4a31-953b-8f22d3613301 - account: account - tracking_categories: - - f1214c24-2702-4617-b74b-3ddecfc0d384 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - tax_amount: tax_amount - total_line_amount: total_line_amount - currency: XUA - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - exchange_rate: '2.9' - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - remote_fields: - - remote_field_class: remote_field_class - inclusive_of_tax: true - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - accounting_period: accounting_period - remote_created_at: '2020-03-31T00:00:00Z' - remote_updated_at: '2020-03-31T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - lineItemsRemoteFieldClassesList: - path: /accounting/v1/purchase-orders/line-items/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: PurchaseOrdersLineItemsRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - field_choices - metaPostRetrieve: - path: /accounting/v1/purchase-orders/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `PurchaseOrder` POSTs. - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - remoteFieldClassesList: - path: /accounting/v1/purchase-orders/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: PurchaseOrdersRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - field_choices - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/regenerateKey.yml b/.mock/definition/Accounting/regenerateKey.yml deleted file mode 100644 index 3fabcb13a..000000000 --- a/.mock/definition/Accounting/regenerateKey.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /accounting/v1/regenerate-key - method: POST - auth: - - tokenAuth: [] - docs: Exchange remote keys. - source: - openapi: accounting_v3.yml - request: - name: RemoteKeyForRegenerationRequest - body: - properties: - name: - type: string - docs: The name of the remote key - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: accountingRoot.RemoteKey - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - name: Remote Deployment Key 1 - response: - body: - name: Remote Deployment Key 1 - key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/scopes.yml b/.mock/definition/Accounting/scopes.yml deleted file mode 100644 index c0e2e7558..000000000 --- a/.mock/definition/Accounting/scopes.yml +++ /dev/null @@ -1,168 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - default_scopes_retrieve: - path: /accounting/v1/default-scopes - method: GET - auth: - - tokenAuth: [] - docs: >- - Get the default permissions for Merge Common Models and fields across - all Linked Accounts of a given category. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - linked_account_scopes_retrieve: - path: /accounting/v1/linked-account-scopes - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all available permissions for Merge Common Models and fields for a - single Linked Account. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - linked_account_scopes_create: - path: /accounting/v1/linked-account-scopes - method: POST - auth: - - tokenAuth: [] - docs: >- - Update permissions for any Common Model or field for a single Linked - Account. Any Scopes not set in this POST request will inherit the - default Scopes. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) - source: - openapi: accounting_v3.yml - request: - name: LinkedAccountCommonModelScopeDeserializerRequest - body: - properties: - common_models: - docs: The common models you want to update the scopes for - type: >- - list - content-type: application/json - response: - docs: '' - type: accountingRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - home_location - disabled_fields: - - work_location - - model_name: Benefit - model_permissions: - WRITE: - is_enabled: false - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/syncStatus.yml b/.mock/definition/Accounting/syncStatus.yml deleted file mode 100644 index bb6eaf28e..000000000 --- a/.mock/definition/Accounting/syncStatus.yml +++ /dev/null @@ -1,64 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/sync-status - method: GET - auth: - - tokenAuth: [] - docs: >- - Get sync status for the current sync and the most recently finished - sync. `last_sync_start` represents the most recent time any sync began. - `last_sync_finished` represents the most recent time any sync completed. - These timestamps may correspond to different sync instances which may - result in a sync start time being later than a separate sync completed - time. To ensure you are retrieving the latest available data reference - the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. - Possible values for `status` and `last_sync_result` are `DISABLED`, - `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more - about sync status in our [Help - Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: SyncStatusListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: accountingRoot.PaginatedSyncStatusList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - model_name: Invoice - model_id: accounting.Invoices - last_sync_start: '2021-03-30T19:44:18Z' - next_sync_start: '2021-03-30T20:44:18Z' - last_sync_result: SYNCING - last_sync_finished: '2021-03-30T19:55:18Z' - status: SYNCING - is_initial_sync: true - selective_sync_configurations_usage: IN_NEXT_SYNC - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/taxRates.yml b/.mock/definition/Accounting/taxRates.yml deleted file mode 100644 index e2fedf7a5..000000000 --- a/.mock/definition/Accounting/taxRates.yml +++ /dev/null @@ -1,211 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/tax-rates - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `TaxRate` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: TaxRatesListRequest - query-parameters: - company_id: - type: optional - docs: If provided, will only return tax rates for this company. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - name: - type: optional - docs: If provided, will only return TaxRates with this name. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: accountingRoot.PaginatedTaxRateList - status-code: 200 - examples: - - query-parameters: - company_id: company_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - name: name - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: b82302de-852e-4e60-b050-edf9da3b7c02 - remote_id: '039111' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - company: company - code: '890' - name: State tax rate - description: Sales Tax - status: ACTIVE - country: US - total_tax_rate: 15 - effective_tax_rate: 15 - tax_components: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '039111' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Drink Tax Component - rate: rate - is_compound: true - component_type: SALES - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - retrieve: - path: /accounting/v1/tax-rates/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `TaxRate` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: TaxRatesRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.TaxRate - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: b82302de-852e-4e60-b050-edf9da3b7c02 - remote_id: '039111' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - company: company - code: '890' - name: State tax rate - description: Sales Tax - status: ACTIVE - country: US - total_tax_rate: 15 - effective_tax_rate: 15 - tax_components: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '039111' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Drink Tax Component - rate: rate - is_compound: true - component_type: SALES - remote_was_deleted: true - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/trackingCategories.yml b/.mock/definition/Accounting/trackingCategories.yml deleted file mode 100644 index 92b731f2a..000000000 --- a/.mock/definition/Accounting/trackingCategories.yml +++ /dev/null @@ -1,231 +0,0 @@ -types: - TrackingCategoriesListRequestCategoryType: - enum: - - value: '' - name: EMPTY - - CLASS - - DEPARTMENT - source: - openapi: accounting_v3.yml - TrackingCategoriesListRequestStatus: - enum: - - value: '' - name: EMPTY - - ACTIVE - - ARCHIVED - source: - openapi: accounting_v3.yml -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/tracking-categories - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `TrackingCategory` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: TrackingCategoriesListRequest - query-parameters: - category_type: - type: optional - docs: If provided, will only return tracking categories with this type. - company_id: - type: optional - docs: >- - If provided, will only return tracking categories for this - company. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - name: - type: optional - docs: If provided, will only return tracking categories with this name. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - status: - type: optional - docs: >- - If provided, will only return tracking categories with this - status. - response: - docs: '' - type: accountingRoot.PaginatedTrackingCategoryList - status-code: 200 - examples: - - query-parameters: - category_type: '' - company_id: company_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - name: name - page_size: 1 - remote_fields: status - remote_id: remote_id - show_enum_origins: status - status: '' - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '948201' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Marketing Department - status: ACTIVE - category_type: CLASS - parent_category: d25d609b-945f-4762-b55a-1c8fb220c43c - company: company - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - retrieve: - path: /accounting/v1/tracking-categories/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `TrackingCategory` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: TrackingCategoriesRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: accountingRoot.TrackingCategory - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: status - show_enum_origins: status - headers: - X-Account-Token: X-Account-Token - response: - body: - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '948201' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Marketing Department - status: ACTIVE - category_type: CLASS - parent_category: d25d609b-945f-4762-b55a-1c8fb220c43c - company: company - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/transactions.yml b/.mock/definition/Accounting/transactions.yml deleted file mode 100644 index 480f38603..000000000 --- a/.mock/definition/Accounting/transactions.yml +++ /dev/null @@ -1,306 +0,0 @@ -types: - TransactionsListRequestExpandItem: - enum: - - account - - accounting_period - - contact - - line_items - - tracking_categories - source: - openapi: accounting_v3.yml - TransactionsRetrieveRequestExpandItem: - enum: - - account - - accounting_period - - contact - - line_items - - tracking_categories - source: - openapi: accounting_v3.yml -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/transactions - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Transaction` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: TransactionsListRequest - query-parameters: - company_id: - type: optional - docs: >- - If provided, will only return accounting transactions for this - company. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - transaction_date_after: - type: optional - docs: If provided, will only return objects created after this datetime. - transaction_date_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - response: - docs: '' - type: accountingRoot.PaginatedTransactionList - status-code: 200 - examples: - - query-parameters: - company_id: company_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - transaction_date_after: '2024-01-15T09:30:00Z' - transaction_date_before: '2024-01-15T09:30:00Z' - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 0048ea5b-911e-4dff-9364-92070dea62ff - remote_id: '239741' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - transaction_type: estimate - number: '122' - transaction_date: '2020-03-31T00:00:00Z' - account: account - contact: contact - inclusive_of_tax: true - total_amount: total_amount - currency: XUA - exchange_rate: '2.9' - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - line_items: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - memo: Pickleball paddles - unit_price: '25.0' - quantity: '10.0' - item: 0958cbc6-6040-430a-848e-aafacbadf4ae - account: 2b38c085-2620-4269-b5ec-75dd9095ed2c - tracking_categories: - - f1214c24-2702-4617-b74b-3ddecfc0d384 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - total_line_amount: total_line_amount - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - currency: USD - exchange_rate: '2.9' - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: false - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - memo: Pickleball balls - unit_price: '25.0' - quantity: '10.0' - item: 249c9faa-3045-4a31-953b-8f22d3613301 - account: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 - tracking_categories: - - f1214c24-2702-4617-b74b-3ddecfc0d384 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - total_line_amount: total_line_amount - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - remote_was_deleted: true - accounting_period: accounting_period - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - retrieve: - path: /accounting/v1/transactions/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Transaction` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: TransactionsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.Transaction - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 0048ea5b-911e-4dff-9364-92070dea62ff - remote_id: '239741' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - transaction_type: estimate - number: '122' - transaction_date: '2020-03-31T00:00:00Z' - account: account - contact: contact - inclusive_of_tax: true - total_amount: total_amount - currency: XUA - exchange_rate: '2.9' - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - line_items: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - memo: Pickleball paddles - unit_price: '25.0' - quantity: '10.0' - item: 0958cbc6-6040-430a-848e-aafacbadf4ae - account: 2b38c085-2620-4269-b5ec-75dd9095ed2c - tracking_categories: - - f1214c24-2702-4617-b74b-3ddecfc0d384 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - total_line_amount: total_line_amount - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - currency: USD - exchange_rate: '2.9' - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: false - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - memo: Pickleball balls - unit_price: '25.0' - quantity: '10.0' - item: 249c9faa-3045-4a31-953b-8f22d3613301 - account: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 - tracking_categories: - - f1214c24-2702-4617-b74b-3ddecfc0d384 - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - total_line_amount: total_line_amount - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - currency: XUA - exchange_rate: '2.9' - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - remote_was_deleted: true - remote_was_deleted: true - accounting_period: accounting_period - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/vendorCredits.yml b/.mock/definition/Accounting/vendorCredits.yml deleted file mode 100644 index 1df382777..000000000 --- a/.mock/definition/Accounting/vendorCredits.yml +++ /dev/null @@ -1,611 +0,0 @@ -types: - VendorCreditsListRequestExpandItem: - enum: - - accounting_period - - company - - lines - - tracking_categories - - vendor - source: - openapi: accounting_v3.yml - VendorCreditsRetrieveRequestExpandItem: - enum: - - accounting_period - - company - - lines - - tracking_categories - - vendor - source: - openapi: accounting_v3.yml -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/vendor-credits - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `VendorCredit` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: accounting_v3.yml - request: - name: VendorCreditsListRequest - query-parameters: - company_id: - type: optional - docs: If provided, will only return vendor credits for this company. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - transaction_date_after: - type: optional - docs: If provided, will only return objects created after this datetime. - transaction_date_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - response: - docs: '' - type: accountingRoot.PaginatedVendorCreditList - status-code: 200 - examples: - - query-parameters: - company_id: company_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - transaction_date_after: '2024-01-15T09:30:00Z' - transaction_date_before: '2024-01-15T09:30:00Z' - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - number: '6' - transaction_date: '2020-03-31T00:00:00Z' - vendor: vendor - total_amount: 10000 - currency: XUA - exchange_rate: '2.9' - inclusive_of_tax: true - company: company - lines: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - net_amount: 25.54 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: Gifted Merge Credit - account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - contact: 908934-49j9-093f-0989-908923908 - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - exchange_rate: '2.9' - remote_was_deleted: false - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121223' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - net_amount: 10 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: Refund for overpayment - account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - applied_to_lines: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - remote_was_deleted: true - accounting_period: accounting_period - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - create: - path: /accounting/v1/vendor-credits - method: POST - auth: - - tokenAuth: [] - docs: Creates a `VendorCredit` object with the given values. - source: - openapi: accounting_v3.yml - request: - name: VendorCreditEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: accountingRoot.VendorCreditRequest - content-type: application/json - response: - docs: '' - type: accountingRoot.VendorCreditResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - number: '6' - transaction_date: '2020-03-31T00:00:00Z' - vendor: vendor - total_amount: 10000 - currency: XUA - exchange_rate: '2.9' - inclusive_of_tax: true - company: company - lines: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - net_amount: 25.54 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: Gifted Merge Credit - account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - contact: 908934-49j9-093f-0989-908923908 - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - exchange_rate: '2.9' - remote_was_deleted: false - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121223' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - net_amount: 10 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: Refund for overpayment - account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - applied_to_lines: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - remote_was_deleted: true - accounting_period: accounting_period - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /accounting/v1/vendor-credits/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `VendorCredit` object with the given `id`. - source: - openapi: accounting_v3.yml - path-parameters: - id: string - request: - name: VendorCreditsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: accountingRoot.VendorCredit - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - number: '6' - transaction_date: '2020-03-31T00:00:00Z' - vendor: vendor - total_amount: 10000 - currency: XUA - exchange_rate: '2.9' - inclusive_of_tax: true - company: company - lines: - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121222' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - net_amount: 25.54 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: Gifted Merge Credit - account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - project: 22e65a5d-2df5-4e6e-884a-e538d0339000 - contact: 908934-49j9-093f-0989-908923908 - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - exchange_rate: '2.9' - remote_was_deleted: false - - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: '121223' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - net_amount: 10 - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - description: Refund for overpayment - account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 - company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 - project: project - contact: contact - tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 - exchange_rate: '2.9' - remote_was_deleted: true - tracking_categories: - - b38c59b0-a9d7-4740-b1ee-5436c6751e3d - - 9b840d2-686a-465a-8a8e-7b028498f8e4 - - a47e11b6-c73b-4a0c-be31-130fc48177fa - applied_to_lines: - - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b - applied_date: '2020-03-31T00:00:00Z' - applied_amount: '2.9' - remote_was_deleted: true - remote_was_deleted: true - accounting_period: accounting_period - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - metaPostRetrieve: - path: /accounting/v1/vendor-credits/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `VendorCredit` POSTs. - source: - openapi: accounting_v3.yml - response: - docs: '' - type: accountingRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/webhookReceivers.yml b/.mock/definition/Accounting/webhookReceivers.yml deleted file mode 100644 index eb04b349d..000000000 --- a/.mock/definition/Accounting/webhookReceivers.yml +++ /dev/null @@ -1,65 +0,0 @@ -imports: - accountingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /accounting/v1/webhook-receivers - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `WebhookReceiver` objects. - source: - openapi: accounting_v3.yml - response: - docs: '' - type: list - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - - event: event - is_active: true - key: key - create: - path: /accounting/v1/webhook-receivers - method: POST - auth: - - tokenAuth: [] - docs: Creates a `WebhookReceiver` object with the given values. - source: - openapi: accounting_v3.yml - request: - name: WebhookReceiverRequest - body: - properties: - event: - type: string - validation: - minLength: 1 - is_active: boolean - key: - type: optional - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: accountingRoot.WebhookReceiver - status-code: 201 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - event: event - is_active: true - response: - body: - event: event - is_active: true - key: key - source: - openapi: accounting_v3.yml diff --git a/.mock/definition/CRM/__package__.yml b/.mock/definition/CRM/__package__.yml deleted file mode 100644 index d5382cc71..000000000 --- a/.mock/definition/CRM/__package__.yml +++ /dev/null @@ -1,5733 +0,0 @@ -types: - AccountOwner: - discriminated: false - docs: The account's owner. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: crm_v3.yml - inline: true - Account: - docs: |- - # The Account Object - ### Description - The `Account` object is used to represent a company in a CRM system. - ### Usage Example - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - owner: - type: optional - docs: The account's owner. - name: - type: optional - docs: The account's name. - description: - type: optional - docs: The account's description. - industry: - type: optional - docs: The account's industry. - website: - type: optional - docs: The account's website. - validation: - format: uri - maxLength: 2000 - number_of_employees: - type: optional - docs: The account's number of employees. - validation: - min: -2147483648 - max: 2147483647 - addresses: optional> - phone_numbers: - type: optional> - access: read-only - last_activity_at: - type: optional - docs: >- - The last date (either most recent or furthest in the future) of when - an activity occurs in an account. - remote_updated_at: - type: optional - docs: >- - When the CRM system account data was last modified by a user with a - login. - remote_created_at: - type: optional - docs: When the third party's account was created. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: crm_v3.yml - AccountDetailsCategory: - discriminated: false - union: - - CategoryEnum - - string - source: - openapi: crm_v3.yml - inline: true - AccountDetails: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - integration: - type: optional - access: read-only - integration_slug: - type: optional - access: read-only - category: optional - end_user_origin_id: - type: optional - access: read-only - end_user_organization_name: - type: optional - access: read-only - end_user_email_address: - type: optional - validation: - format: email - access: read-only - status: - type: optional - access: read-only - webhook_listener_url: - type: optional - validation: - format: uri - access: read-only - is_duplicate: - type: optional - docs: >- - Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test - Linked Accounts, incomplete Production Linked Accounts, and ignored - duplicate Production Linked Account sets. - access: read-only - account_type: - type: optional - access: read-only - completed_at: - type: optional - docs: The time at which account completes the linking flow. - source: - openapi: crm_v3.yml - AccountDetailsAndActionsCategory: - discriminated: false - union: - - CategoryEnum - - string - source: - openapi: crm_v3.yml - inline: true - AccountDetailsAndActionsStatus: - discriminated: false - union: - - AccountDetailsAndActionsStatusEnum - - string - source: - openapi: crm_v3.yml - inline: true - AccountDetailsAndActions: - docs: >- - # The LinkedAccount Object - - ### Description - - The `LinkedAccount` object is used to represent an end user's link with a - specific integration. - - - ### Usage Example - - View a list of your organization's `LinkedAccount` objects. - properties: - id: string - category: optional - status: AccountDetailsAndActionsStatus - status_detail: optional - end_user_origin_id: optional - end_user_organization_name: string - end_user_email_address: string - subdomain: - type: optional - docs: The tenant or domain the customer has provided access to. - webhook_listener_url: string - is_duplicate: - type: optional - docs: >- - Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test - Linked Accounts, incomplete Production Linked Accounts, and ignored - duplicate Production Linked Account sets. - integration: optional - account_type: string - completed_at: datetime - source: - openapi: crm_v3.yml - AccountDetailsAndActionsIntegration: - properties: - name: string - categories: list - image: optional - square_image: optional - color: string - slug: string - passthrough_available: boolean - available_model_operations: optional> - source: - openapi: crm_v3.yml - AccountDetailsAndActionsStatusEnum: - enum: - - COMPLETE - - INCOMPLETE - - RELINK_NEEDED - - IDLE - docs: |- - * `COMPLETE` - COMPLETE - * `INCOMPLETE` - INCOMPLETE - * `RELINK_NEEDED` - RELINK_NEEDED - * `IDLE` - IDLE - source: - openapi: crm_v3.yml - AccountIntegration: - properties: - name: - type: string - docs: Company name. - abbreviated_name: - type: optional - docs: >- - Optional. This shortened name appears in places with limited space, - usually in conjunction with the platform's logo (e.g., Merge Link - menu).

Example: Workforce Now (in lieu of ADP Workforce - Now), SuccessFactors (in lieu of SAP SuccessFactors) - categories: - type: optional> - docs: >- - Category or categories this integration belongs to. Multiple - categories should be comma separated, i.e. [ats, hris]. - access: read-only - image: - type: optional - docs: Company logo in rectangular shape. - validation: - format: uri - square_image: - type: optional - docs: Company logo in square shape. - validation: - format: uri - color: - type: optional - docs: >- - The color of this integration used for buttons and text throughout the - app and landing pages. Choose a darker, saturated color. - validation: - pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ - maxLength: 18 - slug: - type: optional - access: read-only - api_endpoints_to_documentation_urls: - type: optional> - docs: >- - Mapping of API endpoints to documentation urls for support. Example: - {'GET': [['/common-model-scopes', - 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', - 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], - 'POST': []} - webhook_setup_guide_url: - type: optional - docs: >- - Setup guide URL for third party webhook creation. Exposed in Merge - Docs. - category_beta_status: - type: optional> - docs: Category or categories this integration is in beta status for. - access: read-only - source: - openapi: crm_v3.yml - AccountRequestOwner: - discriminated: false - docs: The account's owner. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: crm_v3.yml - inline: true - AccountRequest: - docs: |- - # The Account Object - ### Description - The `Account` object is used to represent a company in a CRM system. - ### Usage Example - TODO - properties: - owner: - type: optional - docs: The account's owner. - name: - type: optional - docs: The account's name. - description: - type: optional - docs: The account's description. - industry: - type: optional - docs: The account's industry. - website: - type: optional - docs: The account's website. - validation: - format: uri - maxLength: 2000 - number_of_employees: - type: optional - docs: The account's number of employees. - validation: - min: -2147483648 - max: 2147483647 - addresses: optional> - last_activity_at: - type: optional - docs: >- - The last date (either most recent or furthest in the future) of when - an activity occurs in an account. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: crm_v3.yml - AccountToken: - properties: - account_token: string - integration: AccountIntegration - id: string - source: - openapi: crm_v3.yml - ActivityTypeEnum: - enum: - - CALL - - MEETING - - EMAIL - docs: |- - * `CALL` - CALL - * `MEETING` - MEETING - * `EMAIL` - EMAIL - source: - openapi: crm_v3.yml - AddressCountry: - discriminated: false - docs: |- - The address's country. - - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - union: - - CountryEnum - - string - source: - openapi: crm_v3.yml - inline: true - AddressAddressType: - discriminated: false - docs: |- - The address type. - - * `BILLING` - BILLING - * `SHIPPING` - SHIPPING - union: - - AddressTypeEnum - - string - source: - openapi: crm_v3.yml - inline: true - Address: - docs: |- - # The Address Object - ### Description - The `Address` object is used to represent an entity's address. - ### Usage Example - TODO - properties: - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - street_1: - type: optional - docs: Line 1 of the address's street. - street_2: - type: optional - docs: Line 2 of the address's street. - city: - type: optional - docs: The address's city. - state: - type: optional - docs: The address's state. - postal_code: - type: optional - docs: The address's postal code. - country: - type: optional - docs: |- - The address's country. - - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - address_type: - type: optional - docs: |- - The address type. - - * `BILLING` - BILLING - * `SHIPPING` - SHIPPING - source: - openapi: crm_v3.yml - AddressRequestCountry: - discriminated: false - docs: |- - The address's country. - - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - union: - - CountryEnum - - string - source: - openapi: crm_v3.yml - inline: true - AddressRequestAddressType: - discriminated: false - docs: |- - The address type. - - * `BILLING` - BILLING - * `SHIPPING` - SHIPPING - union: - - AddressTypeEnum - - string - source: - openapi: crm_v3.yml - inline: true - AddressRequest: - docs: |- - # The Address Object - ### Description - The `Address` object is used to represent an entity's address. - ### Usage Example - TODO - properties: - street_1: - type: optional - docs: Line 1 of the address's street. - street_2: - type: optional - docs: Line 2 of the address's street. - city: - type: optional - docs: The address's city. - state: - type: optional - docs: The address's state. - postal_code: - type: optional - docs: The address's postal code. - country: - type: optional - docs: |- - The address's country. - - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - address_type: - type: optional - docs: |- - The address type. - - * `BILLING` - BILLING - * `SHIPPING` - SHIPPING - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: crm_v3.yml - AddressTypeEnum: - enum: - - BILLING - - SHIPPING - docs: |- - * `BILLING` - BILLING - * `SHIPPING` - SHIPPING - source: - openapi: crm_v3.yml - AdvancedMetadata: - properties: - id: - type: string - validation: - format: uuid - display_name: optional - description: optional - is_required: optional - is_custom: optional - field_choices: optional> - source: - openapi: crm_v3.yml - AssociationAssociationType: - discriminated: false - docs: The association type the association belongs to. - union: - - type: string - validation: - format: uuid - - AssociationType - source: - openapi: crm_v3.yml - inline: true - Association: - docs: |- - # The Association Object - ### Description - The `Association` record refers to an instance of an Association Type. - ### Usage Example - TODO - properties: - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - source_object: - type: optional - validation: - format: uuid - access: read-only - target_object: - type: optional - validation: - format: uuid - access: read-only - association_type: - type: optional - docs: The association type the association belongs to. - source: - openapi: crm_v3.yml - AssociationSubType: - properties: - id: - type: optional - access: read-only - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - origin_type: - type: optional - access: read-only - source: - openapi: crm_v3.yml - AssociationTypeCardinality: - discriminated: false - union: - - CardinalityEnum - - string - source: - openapi: crm_v3.yml - inline: true - AssociationType: - docs: >- - # The AssociationType Object - - ### Description - - The `Association Type` object represents the relationship between two - objects. - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - source_object_class: - type: optional> - docs: >- - The class of the source object (Custom Object or Common Model) for the - association type. - access: read-only - target_object_classes: - type: optional> - access: read-only - remote_key_name: optional - display_name: optional - cardinality: optional - is_required: optional - source: - openapi: crm_v3.yml - AssociationTypeRequestRequest: - properties: - source_object_class: ObjectClassDescriptionRequest - target_object_classes: list - remote_key_name: - type: string - validation: - minLength: 1 - display_name: - type: optional - validation: - minLength: 1 - cardinality: optional - is_required: - type: optional - default: false - source: - openapi: crm_v3.yml - AsyncPassthroughReciept: - properties: - async_passthrough_receipt_id: - type: string - validation: - format: uuid - source: - openapi: crm_v3.yml - AuditLogEventRole: - discriminated: false - docs: >- - Designates the role of the user (or SYSTEM/API if action not taken by a - user) at the time of this Event occurring. - - - * `ADMIN` - ADMIN - - * `DEVELOPER` - DEVELOPER - - * `MEMBER` - MEMBER - - * `API` - API - - * `SYSTEM` - SYSTEM - - * `MERGE_TEAM` - MERGE_TEAM - union: - - RoleEnum - - string - source: - openapi: crm_v3.yml - inline: true - AuditLogEventEventType: - discriminated: false - docs: >- - Designates the type of event that occurred. - - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - union: - - EventTypeEnum - - string - source: - openapi: crm_v3.yml - inline: true - AuditLogEvent: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - user_name: - type: optional - docs: The User's full name at the time of this Event occurring. - validation: - maxLength: 200 - user_email: - type: optional - docs: The User's email at the time of this Event occurring. - validation: - format: email - maxLength: 254 - role: - type: AuditLogEventRole - docs: >- - Designates the role of the user (or SYSTEM/API if action not taken by - a user) at the time of this Event occurring. - - - * `ADMIN` - ADMIN - - * `DEVELOPER` - DEVELOPER - - * `MEMBER` - MEMBER - - * `API` - API - - * `SYSTEM` - SYSTEM - - * `MERGE_TEAM` - MERGE_TEAM - ip_address: - type: string - validation: - maxLength: 45 - event_type: - type: AuditLogEventEventType - docs: >- - Designates the type of event that occurred. - - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - event_description: string - created_at: - type: optional - access: read-only - source: - openapi: crm_v3.yml - AvailableActions: - docs: >- - # The AvailableActions Object - - ### Description - - The `Activity` object is used to see all available model/operation - combinations for an integration. - - - ### Usage Example - - Fetch all the actions available for the `Zenefits` integration. - properties: - integration: AccountIntegration - passthrough_available: boolean - available_model_operations: optional> - source: - openapi: crm_v3.yml - CrmAccountResponse: - properties: - model: Account - warnings: list - errors: list - logs: optional> - source: - openapi: crm_v3.yml - CrmAssociationTypeResponse: - properties: - model: AssociationType - warnings: list - errors: list - logs: optional> - source: - openapi: crm_v3.yml - CrmContactResponse: - properties: - model: Contact - warnings: list - errors: list - logs: optional> - source: - openapi: crm_v3.yml - CrmCustomObjectResponse: - properties: - model: CustomObject - warnings: list - errors: list - logs: optional> - source: - openapi: crm_v3.yml - CardinalityEnum: - enum: - - ONE_TO_ONE - - MANY_TO_ONE - - MANY_TO_MANY - - ONE_TO_MANY - docs: |- - * `ONE_TO_ONE` - ONE_TO_ONE - * `MANY_TO_ONE` - MANY_TO_ONE - * `MANY_TO_MANY` - MANY_TO_MANY - * `ONE_TO_MANY` - ONE_TO_MANY - source: - openapi: crm_v3.yml - CategoriesEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - docs: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - source: - openapi: crm_v3.yml - CategoryEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - docs: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - source: - openapi: crm_v3.yml - CommonModelScopeApi: - properties: - common_models: - docs: The common models you want to update the scopes for - type: list - source: - openapi: crm_v3.yml - CommonModelScopesBodyRequest: - properties: - model_id: - type: string - validation: - minLength: 1 - enabled_actions: list - disabled_fields: list - source: - openapi: crm_v3.yml - ContactAccount: - discriminated: false - docs: The contact's account. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: crm_v3.yml - inline: true - ContactOwner: - discriminated: false - docs: The contact's owner. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: crm_v3.yml - inline: true - Contact: - docs: >- - # The Contact Object - - ### Description - - The `Contact` object is used to represent an existing point of contact at - a company in a CRM system. - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - first_name: - type: optional - docs: The contact's first name. - last_name: - type: optional - docs: The contact's last name. - account: - type: optional - docs: The contact's account. - owner: - type: optional - docs: The contact's owner. - addresses: optional> - email_addresses: optional> - phone_numbers: optional> - last_activity_at: - type: optional - docs: When the contact's last activity occurred. - remote_created_at: - type: optional - docs: When the third party's contact was created. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: crm_v3.yml - ContactRequestAccount: - discriminated: false - docs: The contact's account. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: crm_v3.yml - inline: true - ContactRequestOwner: - discriminated: false - docs: The contact's owner. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: crm_v3.yml - inline: true - ContactRequest: - docs: >- - # The Contact Object - - ### Description - - The `Contact` object is used to represent an existing point of contact at - a company in a CRM system. - - ### Usage Example - - TODO - properties: - first_name: - type: optional - docs: The contact's first name. - last_name: - type: optional - docs: The contact's last name. - account: - type: optional - docs: The contact's account. - owner: - type: optional - docs: The contact's owner. - addresses: optional> - email_addresses: optional> - phone_numbers: optional> - last_activity_at: - type: optional - docs: When the contact's last activity occurred. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: crm_v3.yml - CountryEnum: - enum: - - AF - - AX - - AL - - DZ - - AS - - AD - - AO - - AI - - AQ - - AG - - AR - - AM - - AW - - AU - - AT - - AZ - - BS - - BH - - BD - - BB - - BY - - BE - - BZ - - BJ - - BM - - BT - - BO - - BQ - - BA - - BW - - BV - - BR - - IO - - BN - - BG - - BF - - BI - - CV - - KH - - CM - - CA - - KY - - CF - - TD - - CL - - CN - - CX - - CC - - CO - - KM - - CG - - CD - - CK - - CR - - CI - - HR - - CU - - CW - - CY - - CZ - - DK - - DJ - - DM - - DO - - EC - - EG - - SV - - GQ - - ER - - EE - - SZ - - ET - - FK - - FO - - FJ - - FI - - FR - - GF - - PF - - TF - - GA - - GM - - GE - - DE - - GH - - GI - - GR - - GL - - GD - - GP - - GU - - GT - - GG - - GN - - GW - - GY - - HT - - HM - - VA - - HN - - HK - - HU - - IS - - IN - - ID - - IR - - IQ - - IE - - IM - - IL - - IT - - JM - - JP - - JE - - JO - - KZ - - KE - - KI - - KW - - KG - - LA - - LV - - LB - - LS - - LR - - LY - - LI - - LT - - LU - - MO - - MG - - MW - - MY - - MV - - ML - - MT - - MH - - MQ - - MR - - MU - - YT - - MX - - FM - - MD - - MC - - MN - - ME - - MS - - MA - - MZ - - MM - - NA - - NR - - NP - - NL - - NC - - NZ - - NI - - NE - - NG - - NU - - NF - - KP - - MK - - MP - - 'NO' - - OM - - PK - - PW - - PS - - PA - - PG - - PY - - PE - - PH - - PN - - PL - - PT - - PR - - QA - - RE - - RO - - RU - - RW - - BL - - SH - - KN - - LC - - MF - - PM - - VC - - WS - - SM - - ST - - SA - - SN - - RS - - SC - - SL - - SG - - SX - - SK - - SI - - SB - - SO - - ZA - - GS - - KR - - SS - - ES - - LK - - SD - - SR - - SJ - - SE - - CH - - SY - - TW - - TJ - - TZ - - TH - - TL - - TG - - TK - - TO - - TT - - TN - - TR - - TM - - TC - - TV - - UG - - UA - - AE - - GB - - UM - - US - - UY - - UZ - - VU - - VE - - VN - - VG - - VI - - WF - - EH - - YE - - ZM - - ZW - docs: |- - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - source: - openapi: crm_v3.yml - CustomObject: - docs: |- - # The CustomObject Object - ### Description - The `Custom Object` record refers to an instance of a Custom Object Class. - ### Usage Example - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - object_class: - type: optional - docs: The custom object class the custom object record belongs to. - validation: - format: uuid - fields: - type: optional> - docs: The fields and values contained within the custom object record. - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: crm_v3.yml - CustomObjectClass: - docs: >- - # The Custom Object Class Object - - ### Description - - The `Custom Object Class` object is used to represent a Custom Object - Schema in the remote system. - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - access: read-only - modified_at: - type: optional - access: read-only - name: - type: optional - docs: The custom object class's name. - description: - type: optional - docs: The custom object class's description. - labels: - type: optional>> - docs: The custom object class's singular and plural labels. - access: read-only - fields: - type: optional> - access: read-only - association_types: - type: optional>> - docs: >- - The types of associations with other models that the custom object - class can have. - access: read-only - source: - openapi: crm_v3.yml - CustomObjectRequest: - properties: - fields: map - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: crm_v3.yml - DataPassthroughRequest: - docs: >- - # The DataPassthrough Object - - ### Description - - The `DataPassthrough` object is used to send information to an - otherwise-unsupported third-party endpoint. - - - ### Usage Example - - Create a `DataPassthrough` to get team hierarchies from your Rippling - integration. - properties: - method: MethodEnum - path: - type: string - docs: The path of the request in the third party's platform. - validation: - minLength: 1 - base_url_override: - type: optional - docs: An optional override of the third party's base url for the request. - validation: - minLength: 1 - data: - type: optional - docs: >- - The data with the request. You must include a `request_format` - parameter matching the data's format - validation: - minLength: 1 - multipart_form_data: - type: optional> - docs: >- - Pass an array of `MultipartFormField` objects in here instead of using - the `data` param if `request_format` is set to `MULTIPART`. - headers: - type: optional> - docs: >- - The headers to use for the request (Merge will handle the account's - authorization headers). `Content-Type` header is required for - passthrough. Choose content type corresponding to expected format of - receiving server. - request_format: optional - normalize_response: - type: optional - docs: >- - Optional. If true, the response will always be an object of the form - `{"type": T, "value": ...}` where `T` will be one of `string, boolean, - number, null, array, object`. - source: - openapi: crm_v3.yml - DebugModeLog: - properties: - log_id: string - dashboard_view: string - log_summary: DebugModelLogSummary - source: - openapi: crm_v3.yml - DebugModelLogSummary: - properties: - url: string - method: string - status_code: integer - source: - openapi: crm_v3.yml - DirectionEnum: - enum: - - INBOUND - - OUTBOUND - docs: |- - * `INBOUND` - INBOUND - * `OUTBOUND` - OUTBOUND - source: - openapi: crm_v3.yml - EmailAddress: - docs: |- - # The EmailAddress Object - ### Description - The `EmailAddress` object is used to represent an entity's email address. - ### Usage Example - Fetch from the `GET Contact` endpoint and view their email addresses. - properties: - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - email_address: - type: optional - docs: The email address. - email_address_type: - type: optional - docs: The email address's type. - source: - openapi: crm_v3.yml - EmailAddressRequest: - docs: |- - # The EmailAddress Object - ### Description - The `EmailAddress` object is used to represent an entity's email address. - ### Usage Example - Fetch from the `GET Contact` endpoint and view their email addresses. - properties: - email_address: - type: optional - docs: The email address. - email_address_type: - type: optional - docs: The email address's type. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: crm_v3.yml - EnabledActionsEnum: - enum: - - READ - - WRITE - docs: |- - * `READ` - READ - * `WRITE` - WRITE - source: - openapi: crm_v3.yml - EncodingEnum: - enum: - - RAW - - BASE64 - - GZIP_BASE64 - docs: |- - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - source: - openapi: crm_v3.yml - EngagementOwner: - discriminated: false - docs: The engagement's owner. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: crm_v3.yml - inline: true - EngagementDirection: - discriminated: false - docs: |- - The engagement's direction. - - * `INBOUND` - INBOUND - * `OUTBOUND` - OUTBOUND - union: - - DirectionEnum - - string - source: - openapi: crm_v3.yml - inline: true - EngagementEngagementType: - discriminated: false - docs: The engagement type of the engagement. - union: - - type: string - validation: - format: uuid - - EngagementType - source: - openapi: crm_v3.yml - inline: true - EngagementAccount: - discriminated: false - docs: The account of the engagement. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: crm_v3.yml - inline: true - EngagementContactsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: crm_v3.yml - inline: true - Engagement: - docs: >- - # The Engagement Object - - ### Description - - The `Engagement` object is used to represent an interaction noted in a CRM - system. - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - owner: - type: optional - docs: The engagement's owner. - content: - type: optional - docs: The engagement's content. - subject: - type: optional - docs: The engagement's subject. - direction: - type: optional - docs: |- - The engagement's direction. - - * `INBOUND` - INBOUND - * `OUTBOUND` - OUTBOUND - engagement_type: - type: optional - docs: The engagement type of the engagement. - start_time: - type: optional - docs: The time at which the engagement started. - end_time: - type: optional - docs: The time at which the engagement ended. - account: - type: optional - docs: The account of the engagement. - contacts: optional>> - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: crm_v3.yml - EngagementRequestOwner: - discriminated: false - docs: The engagement's owner. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: crm_v3.yml - inline: true - EngagementRequestDirection: - discriminated: false - docs: |- - The engagement's direction. - - * `INBOUND` - INBOUND - * `OUTBOUND` - OUTBOUND - union: - - DirectionEnum - - string - source: - openapi: crm_v3.yml - inline: true - EngagementRequestEngagementType: - discriminated: false - docs: The engagement type of the engagement. - union: - - type: string - validation: - format: uuid - - EngagementType - source: - openapi: crm_v3.yml - inline: true - EngagementRequestAccount: - discriminated: false - docs: The account of the engagement. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: crm_v3.yml - inline: true - EngagementRequestContactsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: crm_v3.yml - inline: true - EngagementRequest: - docs: >- - # The Engagement Object - - ### Description - - The `Engagement` object is used to represent an interaction noted in a CRM - system. - - ### Usage Example - - TODO - properties: - owner: - type: optional - docs: The engagement's owner. - content: - type: optional - docs: The engagement's content. - subject: - type: optional - docs: The engagement's subject. - direction: - type: optional - docs: |- - The engagement's direction. - - * `INBOUND` - INBOUND - * `OUTBOUND` - OUTBOUND - engagement_type: - type: optional - docs: The engagement type of the engagement. - start_time: - type: optional - docs: The time at which the engagement started. - end_time: - type: optional - docs: The time at which the engagement ended. - account: - type: optional - docs: The account of the engagement. - contacts: optional>> - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: crm_v3.yml - EngagementResponse: - properties: - model: Engagement - warnings: list - errors: list - logs: optional> - source: - openapi: crm_v3.yml - EngagementTypeActivityType: - discriminated: false - docs: |- - The engagement type's activity type. - - * `CALL` - CALL - * `MEETING` - MEETING - * `EMAIL` - EMAIL - union: - - ActivityTypeEnum - - string - source: - openapi: crm_v3.yml - inline: true - EngagementType: - docs: >- - # The Engagement Type Object - - ### Description - - The `Engagement Type` object is used to represent an interaction activity. - A given `Engagement` typically has an `Engagement Type` object represented - in the engagement_type field. - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - activity_type: - type: optional - docs: |- - The engagement type's activity type. - - * `CALL` - CALL - * `MEETING` - MEETING - * `EMAIL` - EMAIL - name: - type: optional - docs: The engagement type's name. - remote_fields: - type: optional> - access: read-only - source: - openapi: crm_v3.yml - ErrorValidationProblem: - properties: - source: optional - title: string - detail: string - problem_type: string - source: - openapi: crm_v3.yml - EventTypeEnum: - enum: - - CREATED_REMOTE_PRODUCTION_API_KEY - - DELETED_REMOTE_PRODUCTION_API_KEY - - CREATED_TEST_API_KEY - - DELETED_TEST_API_KEY - - REGENERATED_PRODUCTION_API_KEY - - REGENERATED_WEBHOOK_SIGNATURE - - INVITED_USER - - TWO_FACTOR_AUTH_ENABLED - - TWO_FACTOR_AUTH_DISABLED - - DELETED_LINKED_ACCOUNT - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - CREATED_DESTINATION - - DELETED_DESTINATION - - CHANGED_DESTINATION - - CHANGED_SCOPES - - CHANGED_PERSONAL_INFORMATION - - CHANGED_ORGANIZATION_SETTINGS - - ENABLED_INTEGRATION - - DISABLED_INTEGRATION - - ENABLED_CATEGORY - - DISABLED_CATEGORY - - CHANGED_PASSWORD - - RESET_PASSWORD - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - FORCED_LINKED_ACCOUNT_RESYNC - - MUTED_ISSUE - - GENERATED_MAGIC_LINK - - ENABLED_MERGE_WEBHOOK - - DISABLED_MERGE_WEBHOOK - - MERGE_WEBHOOK_TARGET_CHANGED - - END_USER_CREDENTIALS_ACCESSED - docs: >- - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - source: - openapi: crm_v3.yml - ExternalTargetFieldApi: - properties: - name: - type: optional - access: read-only - description: - type: optional - access: read-only - is_mapped: - type: optional - access: read-only - source: - openapi: crm_v3.yml - ExternalTargetFieldApiResponse: - properties: - Account: optional> - Contact: optional> - Lead: optional> - Note: optional> - Opportunity: optional> - Stage: optional> - User: optional> - Task: optional> - Engagement: optional> - source: - openapi: crm_v3.yml - FieldFormatEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - docs: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - source: - openapi: crm_v3.yml - FieldMappingApiInstanceTargetField: - properties: - name: string - description: string - is_organization_wide: boolean - source: - openapi: crm_v3.yml - inline: true - FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: - properties: - method: optional - url_path: optional - field_traversal_path: optional> - source: - openapi: crm_v3.yml - inline: true - FieldMappingApiInstanceRemoteField: - properties: - remote_key_name: optional - schema: optional> - remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - source: - openapi: crm_v3.yml - inline: true - FieldMappingApiInstance: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - is_integration_wide: - type: optional - access: read-only - target_field: - type: optional - access: read-only - remote_field: - type: optional - access: read-only - source: - openapi: crm_v3.yml - FieldMappingApiInstanceResponse: - properties: - Account: optional> - Contact: optional> - Lead: optional> - Note: optional> - Opportunity: optional> - Stage: optional> - User: optional> - Task: optional> - Engagement: optional> - source: - openapi: crm_v3.yml - FieldMappingInstanceResponse: - properties: - model: FieldMappingApiInstance - warnings: list - errors: list - logs: optional> - source: - openapi: crm_v3.yml - FieldPermissionDeserializer: - properties: - enabled_fields: optional> - disabled_fields: optional> - source: - openapi: crm_v3.yml - FieldPermissionDeserializerRequest: - properties: - enabled_fields: optional> - disabled_fields: optional> - source: - openapi: crm_v3.yml - FieldTypeEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - docs: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - source: - openapi: crm_v3.yml - IgnoreCommonModelRequestReason: - discriminated: false - union: - - ReasonEnum - - string - source: - openapi: crm_v3.yml - inline: true - IgnoreCommonModelRequest: - properties: - reason: IgnoreCommonModelRequestReason - message: - type: optional - validation: - minLength: 1 - maxLength: 256 - source: - openapi: crm_v3.yml - IndividualCommonModelScopeDeserializer: - properties: - model_name: string - model_permissions: optional> - field_permissions: optional - source: - openapi: crm_v3.yml - IndividualCommonModelScopeDeserializerRequest: - properties: - model_name: - type: string - validation: - minLength: 1 - model_permissions: optional> - field_permissions: optional - source: - openapi: crm_v3.yml - IssueStatus: - discriminated: false - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - union: - - IssueStatusEnum - - string - source: - openapi: crm_v3.yml - inline: true - Issue: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - status: - type: optional - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - error_description: string - end_user: - type: optional> - access: read-only - first_incident_time: optional - last_incident_time: optional - is_muted: - type: optional - access: read-only - error_details: - type: optional> - access: read-only - source: - openapi: crm_v3.yml - IssueStatusEnum: - enum: - - ONGOING - - RESOLVED - docs: |- - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - source: - openapi: crm_v3.yml - ItemFormatEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - docs: |- - * `string` - uuid - * `number` - url - * `date` - email - * `datetime` - phone - * `bool` - currency - * `list` - decimal - source: - openapi: crm_v3.yml - ItemSchema: - properties: - item_type: optional - item_format: optional - item_choices: optional> - source: - openapi: crm_v3.yml - ItemTypeEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - docs: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - source: - openapi: crm_v3.yml - LanguageEnum: - enum: - - en - - de - docs: |- - * `en` - en - * `de` - de - source: - openapi: crm_v3.yml - LastSyncResultEnum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - docs: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - source: - openapi: crm_v3.yml - LeadOwner: - discriminated: false - docs: The lead's owner. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: crm_v3.yml - inline: true - LeadConvertedContact: - discriminated: false - docs: The contact of the converted lead. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: crm_v3.yml - inline: true - LeadConvertedAccount: - discriminated: false - docs: The account of the converted lead. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: crm_v3.yml - inline: true - Lead: - docs: >- - # The Lead Object - - ### Description - - The `Lead` object is used to represent an individual who is a potential - customer. - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - owner: - type: optional - docs: The lead's owner. - lead_source: - type: optional - docs: The lead's source. - title: - type: optional - docs: The lead's title. - company: - type: optional - docs: The lead's company. - first_name: - type: optional - docs: The lead's first name. - last_name: - type: optional - docs: The lead's last name. - addresses: - type: optional> - access: read-only - email_addresses: - type: optional> - access: read-only - phone_numbers: - type: optional> - access: read-only - remote_updated_at: - type: optional - docs: When the third party's lead was updated. - remote_created_at: - type: optional - docs: When the third party's lead was created. - converted_date: - type: optional - docs: When the lead was converted. - converted_contact: - type: optional - docs: The contact of the converted lead. - converted_account: - type: optional - docs: The account of the converted lead. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: crm_v3.yml - LeadRequestOwner: - discriminated: false - docs: The lead's owner. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: crm_v3.yml - inline: true - LeadRequestConvertedContact: - discriminated: false - docs: The contact of the converted lead. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: crm_v3.yml - inline: true - LeadRequestConvertedAccount: - discriminated: false - docs: The account of the converted lead. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: crm_v3.yml - inline: true - LeadRequest: - docs: >- - # The Lead Object - - ### Description - - The `Lead` object is used to represent an individual who is a potential - customer. - - ### Usage Example - - TODO - properties: - owner: - type: optional - docs: The lead's owner. - lead_source: - type: optional - docs: The lead's source. - title: - type: optional - docs: The lead's title. - company: - type: optional - docs: The lead's company. - first_name: - type: optional - docs: The lead's first name. - last_name: - type: optional - docs: The lead's last name. - addresses: optional> - email_addresses: optional> - phone_numbers: optional> - converted_date: - type: optional - docs: When the lead was converted. - converted_contact: - type: optional - docs: The contact of the converted lead. - converted_account: - type: optional - docs: The account of the converted lead. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: crm_v3.yml - LeadResponse: - properties: - model: Lead - warnings: list - errors: list - logs: optional> - source: - openapi: crm_v3.yml - LinkToken: - properties: - link_token: string - integration_name: optional - magic_link_url: optional - source: - openapi: crm_v3.yml - LinkedAccountStatus: - properties: - linked_account_status: string - can_make_request: boolean - source: - openapi: crm_v3.yml - MetaResponse: - properties: - request_schema: map - remote_field_classes: optional> - status: optional - has_conditional_params: boolean - has_required_linked_account_params: boolean - source: - openapi: crm_v3.yml - MethodEnum: - enum: - - GET - - OPTIONS - - HEAD - - POST - - PUT - - PATCH - - DELETE - docs: |- - * `GET` - GET - * `OPTIONS` - OPTIONS - * `HEAD` - HEAD - * `POST` - POST - * `PUT` - PUT - * `PATCH` - PATCH - * `DELETE` - DELETE - source: - openapi: crm_v3.yml - ModelOperation: - docs: >- - # The ModelOperation Object - - ### Description - - The `ModelOperation` object is used to represent the operations that are - currently supported for a given model. - - - ### Usage Example - - View what operations are supported for the `Candidate` endpoint. - properties: - model_name: string - available_operations: list - required_post_parameters: list - supported_fields: list - source: - openapi: crm_v3.yml - ModelPermissionDeserializer: - properties: - is_enabled: optional - source: - openapi: crm_v3.yml - ModelPermissionDeserializerRequest: - properties: - is_enabled: optional - source: - openapi: crm_v3.yml - MultipartFormFieldRequestEncoding: - discriminated: false - docs: |- - The encoding of the value of `data`. Defaults to `RAW` if not defined. - - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - union: - - EncodingEnum - - string - source: - openapi: crm_v3.yml - inline: true - MultipartFormFieldRequest: - docs: >- - # The MultipartFormField Object - - ### Description - - The `MultipartFormField` object is used to represent fields in an HTTP - request using `multipart/form-data`. - - - ### Usage Example - - Create a `MultipartFormField` to define a multipart form entry. - properties: - name: - type: string - docs: The name of the form field - validation: - minLength: 1 - data: - type: string - docs: The data for the form field. - validation: - minLength: 1 - encoding: - type: optional - docs: |- - The encoding of the value of `data`. Defaults to `RAW` if not defined. - - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - file_name: - type: optional - docs: The file name of the form field, if the field is for a file. - validation: - minLength: 1 - content_type: - type: optional - docs: The MIME type of the file, if the field is for a file. - validation: - minLength: 1 - source: - openapi: crm_v3.yml - NoteOwner: - discriminated: false - docs: The note's owner. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: crm_v3.yml - inline: true - NoteContact: - discriminated: false - docs: The note's contact. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: crm_v3.yml - inline: true - NoteAccount: - discriminated: false - docs: The note's account. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: crm_v3.yml - inline: true - NoteOpportunity: - discriminated: false - docs: The note's opportunity. - union: - - type: string - validation: - format: uuid - - Opportunity - source: - openapi: crm_v3.yml - inline: true - Note: - docs: |- - # The Note Object - ### Description - The `Note` object is used to represent a note on another object. - ### Usage Example - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - owner: - type: optional - docs: The note's owner. - content: - type: optional - docs: The note's content. - contact: - type: optional - docs: The note's contact. - account: - type: optional - docs: The note's account. - opportunity: - type: optional - docs: The note's opportunity. - remote_updated_at: - type: optional - docs: When the third party's lead was updated. - remote_created_at: - type: optional - docs: When the third party's lead was created. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: crm_v3.yml - NoteRequestOwner: - discriminated: false - docs: The note's owner. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: crm_v3.yml - inline: true - NoteRequestContact: - discriminated: false - docs: The note's contact. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: crm_v3.yml - inline: true - NoteRequestAccount: - discriminated: false - docs: The note's account. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: crm_v3.yml - inline: true - NoteRequestOpportunity: - discriminated: false - docs: The note's opportunity. - union: - - type: string - validation: - format: uuid - - Opportunity - source: - openapi: crm_v3.yml - inline: true - NoteRequest: - docs: |- - # The Note Object - ### Description - The `Note` object is used to represent a note on another object. - ### Usage Example - TODO - properties: - owner: - type: optional - docs: The note's owner. - content: - type: optional - docs: The note's content. - contact: - type: optional - docs: The note's contact. - account: - type: optional - docs: The note's account. - opportunity: - type: optional - docs: The note's opportunity. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: crm_v3.yml - NoteResponse: - properties: - model: Note - warnings: list - errors: list - logs: optional> - source: - openapi: crm_v3.yml - ObjectClassDescriptionRequest: - properties: - id: - type: string - validation: - minLength: 1 - origin_type: OriginTypeEnum - source: - openapi: crm_v3.yml - OpportunityOwner: - discriminated: false - docs: The opportunity's owner. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: crm_v3.yml - inline: true - OpportunityAccount: - discriminated: false - docs: The account of the opportunity. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: crm_v3.yml - inline: true - OpportunityStage: - discriminated: false - docs: The stage of the opportunity. - union: - - type: string - validation: - format: uuid - - Stage - source: - openapi: crm_v3.yml - inline: true - OpportunityStatus: - discriminated: false - docs: |- - The opportunity's status. - - * `OPEN` - OPEN - * `WON` - WON - * `LOST` - LOST - union: - - OpportunityStatusEnum - - string - source: - openapi: crm_v3.yml - inline: true - Opportunity: - docs: >- - # The Opportunity Object - - ### Description - - The `Opportunity` object is used to represent a deal opportunity in a CRM - system. - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The opportunity's name. - description: - type: optional - docs: The opportunity's description. - amount: - type: optional - docs: The opportunity's amount. - validation: - min: -2147483648 - max: 2147483647 - owner: - type: optional - docs: The opportunity's owner. - account: - type: optional - docs: The account of the opportunity. - stage: - type: optional - docs: The stage of the opportunity. - status: - type: optional - docs: |- - The opportunity's status. - - * `OPEN` - OPEN - * `WON` - WON - * `LOST` - LOST - last_activity_at: - type: optional - docs: When the opportunity's last activity occurred. - close_date: - type: optional - docs: When the opportunity was closed. - remote_created_at: - type: optional - docs: When the third party's opportunity was created. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: crm_v3.yml - OpportunityRequestOwner: - discriminated: false - docs: The opportunity's owner. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: crm_v3.yml - inline: true - OpportunityRequestAccount: - discriminated: false - docs: The account of the opportunity. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: crm_v3.yml - inline: true - OpportunityRequestStage: - discriminated: false - docs: The stage of the opportunity. - union: - - type: string - validation: - format: uuid - - Stage - source: - openapi: crm_v3.yml - inline: true - OpportunityRequestStatus: - discriminated: false - docs: |- - The opportunity's status. - - * `OPEN` - OPEN - * `WON` - WON - * `LOST` - LOST - union: - - OpportunityStatusEnum - - string - source: - openapi: crm_v3.yml - inline: true - OpportunityRequest: - docs: >- - # The Opportunity Object - - ### Description - - The `Opportunity` object is used to represent a deal opportunity in a CRM - system. - - ### Usage Example - - TODO - properties: - name: - type: optional - docs: The opportunity's name. - description: - type: optional - docs: The opportunity's description. - amount: - type: optional - docs: The opportunity's amount. - validation: - min: -2147483648 - max: 2147483647 - owner: - type: optional - docs: The opportunity's owner. - account: - type: optional - docs: The account of the opportunity. - stage: - type: optional - docs: The stage of the opportunity. - status: - type: optional - docs: |- - The opportunity's status. - - * `OPEN` - OPEN - * `WON` - WON - * `LOST` - LOST - last_activity_at: - type: optional - docs: When the opportunity's last activity occurred. - close_date: - type: optional - docs: When the opportunity was closed. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: crm_v3.yml - OpportunityResponse: - properties: - model: Opportunity - warnings: list - errors: list - logs: optional> - source: - openapi: crm_v3.yml - OpportunityStatusEnum: - enum: - - OPEN - - WON - - LOST - docs: |- - * `OPEN` - OPEN - * `WON` - WON - * `LOST` - LOST - source: - openapi: crm_v3.yml - OriginTypeEnum: - enum: - - CUSTOM_OBJECT - - COMMON_MODEL - - REMOTE_ONLY_MODEL - docs: |- - * `CUSTOM_OBJECT` - CUSTOM_OBJECT - * `COMMON_MODEL` - COMMON_MODEL - * `REMOTE_ONLY_MODEL` - REMOTE_ONLY_MODEL - source: - openapi: crm_v3.yml - PaginatedAccountDetailsAndActionsList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedAccountList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedAssociationList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedAssociationTypeList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedAuditLogEventList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedContactList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedCustomObjectClassList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedCustomObjectList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedEngagementList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedEngagementTypeList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedIssueList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedLeadList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedNoteList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedOpportunityList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedRemoteFieldClassList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedStageList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedSyncStatusList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedTaskList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PaginatedUserList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: crm_v3.yml - PatchedAccountRequest: - docs: |- - # The Account Object - ### Description - The `Account` object is used to represent a company in a CRM system. - ### Usage Example - TODO - properties: - owner: - type: optional - docs: The account's owner. - validation: - format: uuid - name: - type: optional - docs: The account's name. - description: - type: optional - docs: The account's description. - industry: - type: optional - docs: The account's industry. - website: - type: optional - docs: The account's website. - validation: - format: uri - maxLength: 2000 - number_of_employees: - type: optional - docs: The account's number of employees. - validation: - min: -2147483648 - max: 2147483647 - addresses: optional> - last_activity_at: - type: optional - docs: >- - The last date (either most recent or furthest in the future) of when - an activity occurs in an account. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: crm_v3.yml - PatchedContactRequestOwner: - discriminated: false - docs: The contact's owner. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: crm_v3.yml - inline: true - PatchedContactRequest: - docs: >- - # The Contact Object - - ### Description - - The `Contact` object is used to represent an existing point of contact at - a company in a CRM system. - - ### Usage Example - - TODO - properties: - first_name: - type: optional - docs: The contact's first name. - last_name: - type: optional - docs: The contact's last name. - account: - type: optional - docs: The contact's account. - validation: - format: uuid - owner: - type: optional - docs: The contact's owner. - addresses: optional> - email_addresses: optional> - phone_numbers: optional> - last_activity_at: - type: optional - docs: When the contact's last activity occurred. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: crm_v3.yml - PatchedEngagementRequestDirection: - discriminated: false - docs: |- - The engagement's direction. - - * `INBOUND` - INBOUND - * `OUTBOUND` - OUTBOUND - union: - - DirectionEnum - - string - source: - openapi: crm_v3.yml - inline: true - PatchedEngagementRequest: - docs: >- - # The Engagement Object - - ### Description - - The `Engagement` object is used to represent an interaction noted in a CRM - system. - - ### Usage Example - - TODO - properties: - owner: - type: optional - docs: The engagement's owner. - validation: - format: uuid - content: - type: optional - docs: The engagement's content. - subject: - type: optional - docs: The engagement's subject. - direction: - type: optional - docs: |- - The engagement's direction. - - * `INBOUND` - INBOUND - * `OUTBOUND` - OUTBOUND - engagement_type: - type: optional - docs: The engagement type of the engagement. - validation: - format: uuid - start_time: - type: optional - docs: The time at which the engagement started. - end_time: - type: optional - docs: The time at which the engagement ended. - account: - type: optional - docs: The account of the engagement. - validation: - format: uuid - contacts: optional>> - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: crm_v3.yml - PatchedOpportunityRequestStatus: - discriminated: false - docs: |- - The opportunity's status. - - * `OPEN` - OPEN - * `WON` - WON - * `LOST` - LOST - union: - - OpportunityStatusEnum - - string - source: - openapi: crm_v3.yml - inline: true - PatchedOpportunityRequest: - docs: >- - # The Opportunity Object - - ### Description - - The `Opportunity` object is used to represent a deal opportunity in a CRM - system. - - ### Usage Example - - TODO - properties: - name: - type: optional - docs: The opportunity's name. - description: - type: optional - docs: The opportunity's description. - amount: - type: optional - docs: The opportunity's amount. - validation: - min: -2147483648 - max: 2147483647 - owner: - type: optional - docs: The opportunity's owner. - validation: - format: uuid - account: - type: optional - docs: The account of the opportunity. - validation: - format: uuid - stage: - type: optional - docs: The stage of the opportunity. - validation: - format: uuid - status: - type: optional - docs: |- - The opportunity's status. - - * `OPEN` - OPEN - * `WON` - WON - * `LOST` - LOST - last_activity_at: - type: optional - docs: When the opportunity's last activity occurred. - close_date: - type: optional - docs: When the opportunity was closed. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: crm_v3.yml - PatchedTaskRequestStatus: - discriminated: false - docs: |- - The task's status. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - union: - - TaskStatusEnum - - string - source: - openapi: crm_v3.yml - inline: true - PatchedTaskRequest: - docs: |- - # The Task Object - ### Description - The `Task` object is used to represent a task, such as a to-do item. - ### Usage Example - TODO - properties: - subject: - type: optional - docs: The task's subject. - content: - type: optional - docs: The task's content. - owner: - type: optional - docs: The task's owner. - validation: - format: uuid - account: - type: optional - docs: The task's account. - validation: - format: uuid - opportunity: - type: optional - docs: The task's opportunity. - validation: - format: uuid - completed_date: - type: optional - docs: When the task is completed. - due_date: - type: optional - docs: When the task is due. - status: - type: optional - docs: |- - The task's status. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: crm_v3.yml - PhoneNumber: - docs: |- - # The PhoneNumber Object - ### Description - The `PhoneNumber` object is used to represent an entity's phone number. - ### Usage Example - Fetch from the `GET Contact` endpoint and view their phone numbers. - properties: - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - phone_number: - type: optional - docs: The phone number. - phone_number_type: - type: optional - docs: The phone number's type. - source: - openapi: crm_v3.yml - PhoneNumberRequest: - docs: |- - # The PhoneNumber Object - ### Description - The `PhoneNumber` object is used to represent an entity's phone number. - ### Usage Example - Fetch from the `GET Contact` endpoint and view their phone numbers. - properties: - phone_number: - type: optional - docs: The phone number. - phone_number_type: - type: optional - docs: The phone number's type. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: crm_v3.yml - ReasonEnum: - enum: - - GENERAL_CUSTOMER_REQUEST - - GDPR - - OTHER - docs: |- - * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST - * `GDPR` - GDPR - * `OTHER` - OTHER - source: - openapi: crm_v3.yml - RemoteData: - docs: >- - # The RemoteData Object - - ### Description - - The `RemoteData` object is used to represent the full data pulled from the - third-party API for an object. - - - ### Usage Example - - TODO - properties: - path: - type: string - docs: The third-party API path that is being called. - data: - type: optional - access: read-only - source: - openapi: crm_v3.yml - RemoteEndpointInfo: - properties: - method: string - url_path: string - field_traversal_path: list - source: - openapi: crm_v3.yml - RemoteFieldRemoteFieldClass: - discriminated: false - union: - - string - - RemoteFieldClass - source: - openapi: crm_v3.yml - inline: true - RemoteField: - properties: - remote_field_class: RemoteFieldRemoteFieldClass - value: optional - source: - openapi: crm_v3.yml - RemoteFieldApiCoverage: - discriminated: false - union: - - integer - - double - source: - openapi: crm_v3.yml - inline: true - RemoteFieldApi: - properties: - schema: map - remote_key_name: string - remote_endpoint_info: RemoteEndpointInfo - example_values: optional> - advanced_metadata: optional - coverage: - type: optional - access: read-only - source: - openapi: crm_v3.yml - RemoteFieldApiResponse: - properties: - Account: optional> - Contact: optional> - Lead: optional> - Note: optional> - Opportunity: optional> - Stage: optional> - User: optional> - Task: optional> - Engagement: optional> - source: - openapi: crm_v3.yml - RemoteFieldClassFieldChoicesItem: - properties: - value: optional - display_name: optional - source: - openapi: crm_v3.yml - inline: true - RemoteFieldClass: - properties: - id: optional - display_name: optional - remote_key_name: optional - description: optional - is_custom: optional - is_required: optional - field_type: optional - field_format: optional - field_choices: optional> - item_schema: optional - source: - openapi: crm_v3.yml - RemoteFieldClassForCustomObjectClassFieldType: - discriminated: false - union: - - FieldTypeEnum - - string - source: - openapi: crm_v3.yml - inline: true - RemoteFieldClassForCustomObjectClassFieldFormat: - discriminated: false - union: - - FieldFormatEnum - - string - source: - openapi: crm_v3.yml - inline: true - RemoteFieldClassForCustomObjectClassFieldChoicesItem: - properties: - value: optional - display_name: optional - source: - openapi: crm_v3.yml - inline: true - RemoteFieldClassForCustomObjectClassItemSchema: - properties: - item_type: optional - item_format: optional - item_choices: optional>> - source: - openapi: crm_v3.yml - inline: true - RemoteFieldClassForCustomObjectClass: - properties: - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - display_name: optional - remote_key_name: optional - description: optional - is_required: optional - field_type: - type: optional - access: read-only - field_format: - type: optional - access: read-only - field_choices: - type: optional> - access: read-only - item_schema: - type: optional - access: read-only - source: - openapi: crm_v3.yml - RemoteFieldRequestRemoteFieldClass: - discriminated: false - union: - - type: string - validation: - format: uuid - - RemoteFieldClass - source: - openapi: crm_v3.yml - inline: true - RemoteFieldRequest: - properties: - remote_field_class: RemoteFieldRequestRemoteFieldClass - value: optional - source: - openapi: crm_v3.yml - RemoteKey: - docs: >- - # The RemoteKey Object - - ### Description - - The `RemoteKey` object is used to represent a request for a new remote - key. - - - ### Usage Example - - Post a `GenerateRemoteKey` to receive a new `RemoteKey`. - properties: - name: string - key: string - source: - openapi: crm_v3.yml - RemoteResponseResponseType: - discriminated: false - union: - - ResponseTypeEnum - - string - source: - openapi: crm_v3.yml - inline: true - RemoteResponse: - docs: >- - # The RemoteResponse Object - - ### Description - - The `RemoteResponse` object is used to represent information returned from - a third-party endpoint. - - - ### Usage Example - - View the `RemoteResponse` returned from your `DataPassthrough`. - properties: - method: string - path: string - status: integer - response: unknown - response_headers: optional> - response_type: optional - headers: optional> - source: - openapi: crm_v3.yml - RequestFormatEnum: - enum: - - JSON - - XML - - MULTIPART - docs: |- - * `JSON` - JSON - * `XML` - XML - * `MULTIPART` - MULTIPART - source: - openapi: crm_v3.yml - ResponseTypeEnum: - enum: - - JSON - - BASE64_GZIP - docs: |- - * `JSON` - JSON - * `BASE64_GZIP` - BASE64_GZIP - source: - openapi: crm_v3.yml - RoleEnum: - enum: - - ADMIN - - DEVELOPER - - MEMBER - - API - - SYSTEM - - MERGE_TEAM - docs: |- - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - source: - openapi: crm_v3.yml - SelectiveSyncConfigurationsUsageEnum: - enum: - - IN_NEXT_SYNC - - IN_LAST_SYNC - docs: |- - * `IN_NEXT_SYNC` - IN_NEXT_SYNC - * `IN_LAST_SYNC` - IN_LAST_SYNC - source: - openapi: crm_v3.yml - Stage: - docs: |- - # The Stage Object - ### Description - The `Stage` object is used to represent the stage of an opportunity. - ### Usage Example - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The stage's name. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: crm_v3.yml - StatusFd5Enum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - docs: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - source: - openapi: crm_v3.yml - SyncStatusLastSyncResult: - discriminated: false - union: - - LastSyncResultEnum - - string - source: - openapi: crm_v3.yml - inline: true - SyncStatusStatus: - discriminated: false - union: - - StatusFd5Enum - - string - source: - openapi: crm_v3.yml - inline: true - SyncStatus: - docs: >- - # The SyncStatus Object - - ### Description - - The `SyncStatus` object is used to represent the syncing state of an - account - - - ### Usage Example - - View the `SyncStatus` for an account to see how recently its models were - synced. - properties: - model_name: string - model_id: string - last_sync_start: optional - next_sync_start: optional - last_sync_result: optional - last_sync_finished: optional - status: SyncStatusStatus - is_initial_sync: boolean - selective_sync_configurations_usage: optional - source: - openapi: crm_v3.yml - TaskOwner: - discriminated: false - docs: The task's owner. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: crm_v3.yml - inline: true - TaskAccount: - discriminated: false - docs: The task's account. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: crm_v3.yml - inline: true - TaskOpportunity: - discriminated: false - docs: The task's opportunity. - union: - - type: string - validation: - format: uuid - - Opportunity - source: - openapi: crm_v3.yml - inline: true - TaskStatus: - discriminated: false - docs: |- - The task's status. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - union: - - TaskStatusEnum - - string - source: - openapi: crm_v3.yml - inline: true - Task: - docs: |- - # The Task Object - ### Description - The `Task` object is used to represent a task, such as a to-do item. - ### Usage Example - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - subject: - type: optional - docs: The task's subject. - content: - type: optional - docs: The task's content. - owner: - type: optional - docs: The task's owner. - account: - type: optional - docs: The task's account. - opportunity: - type: optional - docs: The task's opportunity. - completed_date: - type: optional - docs: When the task is completed. - due_date: - type: optional - docs: When the task is due. - status: - type: optional - docs: |- - The task's status. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: crm_v3.yml - TaskRequestOwner: - discriminated: false - docs: The task's owner. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: crm_v3.yml - inline: true - TaskRequestAccount: - discriminated: false - docs: The task's account. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: crm_v3.yml - inline: true - TaskRequestOpportunity: - discriminated: false - docs: The task's opportunity. - union: - - type: string - validation: - format: uuid - - Opportunity - source: - openapi: crm_v3.yml - inline: true - TaskRequestStatus: - discriminated: false - docs: |- - The task's status. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - union: - - TaskStatusEnum - - string - source: - openapi: crm_v3.yml - inline: true - TaskRequest: - docs: |- - # The Task Object - ### Description - The `Task` object is used to represent a task, such as a to-do item. - ### Usage Example - TODO - properties: - subject: - type: optional - docs: The task's subject. - content: - type: optional - docs: The task's content. - owner: - type: optional - docs: The task's owner. - account: - type: optional - docs: The task's account. - opportunity: - type: optional - docs: The task's opportunity. - completed_date: - type: optional - docs: When the task is completed. - due_date: - type: optional - docs: When the task is due. - status: - type: optional - docs: |- - The task's status. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: crm_v3.yml - TaskResponse: - properties: - model: Task - warnings: list - errors: list - logs: optional> - source: - openapi: crm_v3.yml - TaskStatusEnum: - enum: - - OPEN - - CLOSED - docs: |- - * `OPEN` - OPEN - * `CLOSED` - CLOSED - source: - openapi: crm_v3.yml - User: - docs: >- - # The User Object - - ### Description - - The `User` object is used to represent a user with a login to the CRM - system. - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The user's name. - email: - type: optional - docs: The user's email address. - is_active: - type: optional - docs: Whether or not the user is active. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: crm_v3.yml - ValidationProblemSource: - properties: - pointer: string - source: - openapi: crm_v3.yml - WarningValidationProblem: - properties: - source: optional - title: string - detail: string - problem_type: string - source: - openapi: crm_v3.yml - WebhookReceiver: - properties: - event: string - is_active: boolean - key: optional - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/accountDetails.yml b/.mock/definition/CRM/accountDetails.yml deleted file mode 100644 index a624217a6..000000000 --- a/.mock/definition/CRM/accountDetails.yml +++ /dev/null @@ -1,38 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /crm/v1/account-details - method: GET - auth: - - tokenAuth: [] - docs: Get details for a linked account. - source: - openapi: crm_v3.yml - response: - docs: '' - type: crmRoot.AccountDetails - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - integration: BambooHR - integration_slug: bamboohr - category: hris - end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - end_user_organization_name: Waystar Royco - end_user_email_address: kendall.roy@waystar-royco.com - status: COMPLETE - webhook_listener_url: >- - https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: true - account_type: PRODUCTION - completed_at: '2024-08-26T20:11:19Z' - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/accountToken.yml b/.mock/definition/CRM/accountToken.yml deleted file mode 100644 index a58e52063..000000000 --- a/.mock/definition/CRM/accountToken.yml +++ /dev/null @@ -1,47 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /crm/v1/account-token/{public_token} - method: GET - auth: - - tokenAuth: [] - docs: >- - Returns the account token for the end user with the provided public - token. - source: - openapi: crm_v3.yml - path-parameters: - public_token: string - response: - docs: '' - type: crmRoot.AccountToken - status-code: 200 - examples: - - path-parameters: - public_token: public_token - headers: - X-Account-Token: '[object Object]' - response: - body: - account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB - integration: - name: name - abbreviated_name: abbreviated_name - categories: - - hris - image: image - square_image: square_image - color: color - slug: slug - api_endpoints_to_documentation_urls: - key: value - webhook_setup_guide_url: webhook_setup_guide_url - category_beta_status: - key: value - id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/accounts.yml b/.mock/definition/CRM/accounts.yml deleted file mode 100644 index e92b3aef2..000000000 --- a/.mock/definition/CRM/accounts.yml +++ /dev/null @@ -1,903 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /crm/v1/accounts - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Account` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: AccountsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - name: - type: optional - docs: If provided, will only return accounts with this name. - owner_id: - type: optional - docs: If provided, will only return accounts with this owner. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: crmRoot.PaginatedAccountList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - name: name - owner_id: owner_id - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - owner: owner - name: Merge API - description: One API for all integrations - industry: API's - website: https://merge.dev/ - number_of_employees: 276000 - addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - phone_number: '+16788879833' - phone_number_type: Mobile - last_activity_at: '2022-02-10T00:00:00Z' - remote_updated_at: '2022-01-09T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /accounts - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - create: - path: /crm/v1/accounts - method: POST - auth: - - tokenAuth: [] - docs: Creates an `Account` object with the given values. - source: - openapi: crm_v3.yml - request: - name: CrmAccountEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: crmRoot.AccountRequest - content-type: application/json - response: - docs: '' - type: crmRoot.CrmAccountResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - owner: owner - name: Merge API - description: One API for all integrations - industry: API's - website: https://merge.dev/ - number_of_employees: 276000 - addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - phone_number: '+16788879833' - phone_number_type: Mobile - last_activity_at: '2022-02-10T00:00:00Z' - remote_updated_at: '2022-01-09T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /accounts - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /crm/v1/accounts/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Account` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - id: string - request: - name: AccountsRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: crmRoot.Account - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - owner: owner - name: Merge API - description: One API for all integrations - industry: API's - website: https://merge.dev/ - number_of_employees: 276000 - addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - phone_number: '+16788879833' - phone_number_type: Mobile - last_activity_at: '2022-02-10T00:00:00Z' - remote_updated_at: '2022-01-09T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /accounts - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - partialUpdate: - path: /crm/v1/accounts/{id} - method: PATCH - auth: - - tokenAuth: [] - docs: Updates an `Account` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - id: string - request: - name: PatchedCrmAccountEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: crmRoot.PatchedAccountRequest - content-type: application/json - response: - docs: '' - type: crmRoot.CrmAccountResponse - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - owner: owner - name: Merge API - description: One API for all integrations - industry: API's - website: https://merge.dev/ - number_of_employees: 276000 - addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - phone_number: '+16788879833' - phone_number_type: Mobile - last_activity_at: '2022-02-10T00:00:00Z' - remote_updated_at: '2022-01-09T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /accounts - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - metaPatchRetrieve: - path: /crm/v1/accounts/meta/patch/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `CRMAccount` PATCHs. - source: - openapi: crm_v3.yml - path-parameters: - id: string - response: - docs: '' - type: crmRoot.MetaResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - metaPostRetrieve: - path: /crm/v1/accounts/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `CRMAccount` POSTs. - source: - openapi: crm_v3.yml - response: - docs: '' - type: crmRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - remoteFieldClassesList: - path: /crm/v1/accounts/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: AccountsRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: crmRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - {} - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/associationTypes.yml b/.mock/definition/CRM/associationTypes.yml deleted file mode 100644 index 309496c42..000000000 --- a/.mock/definition/CRM/associationTypes.yml +++ /dev/null @@ -1,451 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - custom_object_classes_association_types_list: - path: /crm/v1/custom-object-classes/{custom_object_class_id}/association-types - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `AssociationType` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - path-parameters: - custom_object_class_id: string - request: - name: CustomObjectClassesAssociationTypesListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: crmRoot.PaginatedAssociationTypeList - status-code: 200 - examples: - - path-parameters: - custom_object_class_id: custom_object_class_id - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 5bb73c32-3c6c-4757-ab7d-7d3540a1be31 - remote_id: '93' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - source_object_class: - id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 - origin_type: CUSTOM_OBJECT - target_object_classes: - - id: Opportunity - origin_type: COMMON_MODEL - remote_key_name: order_to_opportunity - display_name: Order to Opportunity - cardinality: ONE_TO_ONE - is_required: true - custom_object_classes_association_types_create: - path: /crm/v1/custom-object-classes/{custom_object_class_id}/association-types - method: POST - auth: - - tokenAuth: [] - docs: Creates an `AssociationType` object with the given values. - source: - openapi: crm_v3.yml - path-parameters: - custom_object_class_id: string - request: - name: CrmAssociationTypeEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: crmRoot.AssociationTypeRequestRequest - content-type: application/json - response: - docs: '' - type: crmRoot.CrmAssociationTypeResponse - status-code: 201 - examples: - - path-parameters: - custom_object_class_id: custom_object_class_id - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: - source_object_class: - id: id - origin_type: CUSTOM_OBJECT - target_object_classes: - - id: id - origin_type: CUSTOM_OBJECT - remote_key_name: remote_key_name - response: - body: - model: - id: 5bb73c32-3c6c-4757-ab7d-7d3540a1be31 - remote_id: '93' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - source_object_class: - id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 - origin_type: CUSTOM_OBJECT - target_object_classes: - - id: Opportunity - origin_type: COMMON_MODEL - remote_key_name: order_to_opportunity - display_name: Order to Opportunity - cardinality: ONE_TO_ONE - is_required: true - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - custom_object_classes_association_types_retrieve: - path: >- - /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `AssociationType` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - custom_object_class_id: string - id: string - request: - name: CustomObjectClassesAssociationTypesRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: crmRoot.AssociationType - status-code: 200 - examples: - - path-parameters: - custom_object_class_id: custom_object_class_id - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 5bb73c32-3c6c-4757-ab7d-7d3540a1be31 - remote_id: '93' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - source_object_class: - id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 - origin_type: CUSTOM_OBJECT - target_object_classes: - - id: Opportunity - created_at: '2024-01-15T09:30:00Z' - modified_at: '2024-01-15T09:30:00Z' - origin_type: COMMON_MODEL - remote_key_name: order_to_opportunity - display_name: Order to Opportunity - cardinality: ONE_TO_ONE - is_required: true - custom_object_classes_association_types_meta_post_retrieve: - path: >- - /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `CRMAssociationType` POSTs. - source: - openapi: crm_v3.yml - path-parameters: - custom_object_class_id: string - response: - docs: '' - type: crmRoot.MetaResponse - status-code: 200 - examples: - - path-parameters: - custom_object_class_id: custom_object_class_id - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/associations.yml b/.mock/definition/CRM/associations.yml deleted file mode 100644 index 435eb2445..000000000 --- a/.mock/definition/CRM/associations.yml +++ /dev/null @@ -1,166 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - custom_object_classes_custom_objects_associations_list: - path: >- - /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{object_id}/associations - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Association` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - path-parameters: - custom_object_class_id: string - object_id: string - request: - name: CustomObjectClassesCustomObjectsAssociationsListRequest - query-parameters: - association_type_id: - type: optional - docs: >- - If provided, will only return opportunities with this - association_type. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: crmRoot.PaginatedAssociationList - status-code: 200 - examples: - - path-parameters: - custom_object_class_id: custom_object_class_id - object_id: object_id - query-parameters: - association_type_id: association_type_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - source_object: a8f5d29f-4e50-473f-8f12-27128ffcd37a - target_object: da0b1963-be70-469c-9f8c-06a81d0fe759 - association_type: association_type - custom_object_classes_custom_objects_associations_update: - path: >- - /crm/v1/custom-object-classes/{source_class_id}/custom-objects/{source_object_id}/associations/{target_class_id}/{target_object_id}/{association_type_id} - method: PUT - auth: - - tokenAuth: [] - docs: >- - Creates an Association between `source_object_id` and `target_object_id` - of type `association_type_id`. - source: - openapi: crm_v3.yml - path-parameters: - source_class_id: string - source_object_id: string - target_class_id: string - target_object_id: string - association_type_id: string - request: - name: CustomObjectClassesCustomObjectsAssociationsUpdateRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - response: - docs: '' - type: crmRoot.Association - status-code: 200 - examples: - - path-parameters: - source_class_id: source_class_id - source_object_id: source_object_id - target_class_id: target_class_id - target_object_id: target_object_id - association_type_id: association_type_id - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - response: - body: - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - source_object: a8f5d29f-4e50-473f-8f12-27128ffcd37a - target_object: da0b1963-be70-469c-9f8c-06a81d0fe759 - association_type: association_type - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/asyncPassthrough.yml b/.mock/definition/CRM/asyncPassthrough.yml deleted file mode 100644 index ee3155643..000000000 --- a/.mock/definition/CRM/asyncPassthrough.yml +++ /dev/null @@ -1,74 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /crm/v1/async-passthrough - method: POST - auth: - - tokenAuth: [] - docs: >- - Asynchronously pull data from an endpoint not currently supported by - Merge. - source: - openapi: crm_v3.yml - request: - body: crmRoot.DataPassthroughRequest - content-type: application/json - response: - docs: '' - type: crmRoot.AsyncPassthroughReciept - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - method: GET - path: /scooters - response: - body: - async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd - retrieve: - path: /crm/v1/async-passthrough/{async_passthrough_receipt_id} - method: GET - auth: - - tokenAuth: [] - docs: Retrieves data from earlier async-passthrough POST request - source: - openapi: crm_v3.yml - path-parameters: - async_passthrough_receipt_id: string - response: - docs: '' - type: AsyncPassthroughRetrieveResponse - status-code: 200 - examples: - - path-parameters: - async_passthrough_receipt_id: async_passthrough_receipt_id - headers: - X-Account-Token: X-Account-Token - response: - body: - method: GET - path: /scooters - status: 200 - response: - key: value - response_headers: - X-Page-Token: value - response_type: JSON - headers: - EXTRA-HEADER: value - Authorization: - source: - openapi: crm_v3.yml -types: - AsyncPassthroughRetrieveResponse: - discriminated: false - union: - - crmRoot.RemoteResponse - - string - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/auditTrail.yml b/.mock/definition/CRM/auditTrail.yml deleted file mode 100644 index e12fd4751..000000000 --- a/.mock/definition/CRM/auditTrail.yml +++ /dev/null @@ -1,108 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /crm/v1/audit-trail - method: GET - auth: - - tokenAuth: [] - docs: Gets a list of audit trail events. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: AuditTrailListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - end_date: - type: optional - docs: >- - If included, will only include audit trail events that occurred - before this time - event_type: - type: optional - docs: >- - If included, will only include events with the given event type. - Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, - `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, - `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, - `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, - `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, - `DELETED_LINKED_ACCOUNT`, - `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, - `CREATED_DESTINATION`, `DELETED_DESTINATION`, - `CHANGED_DESTINATION`, `CHANGED_SCOPES`, - `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, - `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, - `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, - `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, - `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, - `END_USER_CREDENTIALS_ACCESSED` - page_size: - type: optional - docs: Number of results to return per page. - start_date: - type: optional - docs: >- - If included, will only include audit trail events that occurred - after this time - user_email: - type: optional - docs: >- - If provided, this will return events associated with the specified - user email. Please note that the email address reflects the user's - email at the time of the event, and may not be their current - email. - response: - docs: '' - type: crmRoot.PaginatedAuditLogEventList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_date: end_date - event_type: event_type - page_size: 1 - start_date: start_date - user_email: user_email - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: b5ceea2a-7171-47ce-8090-165cfce5572c - user_name: Gil Feig - user_email: hello@merge.dev - role: ADMIN - ip_address: 192.0.2.123 - event_type: CREATED_REMOTE_PRODUCTION_API_KEY - event_description: >- - Organization-wide Scopes for model hris.Employee updated - from Read to Read+Write - created_at: '2024-01-15T09:30:00Z' - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/availableActions.yml b/.mock/definition/CRM/availableActions.yml deleted file mode 100644 index 44a78dad2..000000000 --- a/.mock/definition/CRM/availableActions.yml +++ /dev/null @@ -1,52 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /crm/v1/available-actions - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of models and actions available for an account. - source: - openapi: crm_v3.yml - response: - docs: '' - type: crmRoot.AvailableActions - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - integration: - name: name - abbreviated_name: abbreviated_name - categories: - - hris - image: image - square_image: square_image - color: color - slug: slug - api_endpoints_to_documentation_urls: - key: value - webhook_setup_guide_url: webhook_setup_guide_url - category_beta_status: - key: value - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/contacts.yml b/.mock/definition/CRM/contacts.yml deleted file mode 100644 index c9b501e3f..000000000 --- a/.mock/definition/CRM/contacts.yml +++ /dev/null @@ -1,956 +0,0 @@ -types: - ContactsListRequestExpandItem: - enum: - - account - - owner - source: - openapi: crm_v3.yml - ContactsRetrieveRequestExpandItem: - enum: - - account - - owner - source: - openapi: crm_v3.yml -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /crm/v1/contacts - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Contact` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: ContactsListRequest - query-parameters: - account_id: - type: optional - docs: If provided, will only return contacts with this account. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - email_addresses: - type: optional - docs: >- - If provided, will only return contacts matching the email - addresses; multiple email_addresses can be separated by commas. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - phone_numbers: - type: optional - docs: >- - If provided, will only return contacts matching the phone numbers; - multiple phone numbers can be separated by commas. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: crmRoot.PaginatedContactList - status-code: 200 - examples: - - query-parameters: - account_id: account_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - email_addresses: email_addresses - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - phone_numbers: phone_numbers - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - first_name: Gil - last_name: Feig - account: account - owner: owner - addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - email_addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - email_address: hello@merge.dev - email_address_type: Work - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - phone_number: '+13785579223' - phone_number_type: Mobile - last_activity_at: '2022-02-10T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /contacts - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - create: - path: /crm/v1/contacts - method: POST - auth: - - tokenAuth: [] - docs: Creates a `Contact` object with the given values. - source: - openapi: crm_v3.yml - request: - name: CrmContactEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: crmRoot.ContactRequest - content-type: application/json - response: - docs: '' - type: crmRoot.CrmContactResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - first_name: Gil - last_name: Feig - account: account - owner: owner - addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - email_addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - email_address: hello@merge.dev - email_address_type: Work - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - phone_number: '+13785579223' - phone_number_type: Mobile - last_activity_at: '2022-02-10T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /contacts - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /crm/v1/contacts/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Contact` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - id: string - request: - name: ContactsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: crmRoot.Contact - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - first_name: Gil - last_name: Feig - account: account - owner: owner - addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - email_addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - email_address: hello@merge.dev - email_address_type: Work - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - phone_number: '+13785579223' - phone_number_type: Mobile - last_activity_at: '2022-02-10T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /contacts - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - partialUpdate: - path: /crm/v1/contacts/{id} - method: PATCH - auth: - - tokenAuth: [] - docs: Updates a `Contact` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - id: string - request: - name: PatchedCrmContactEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: crmRoot.PatchedContactRequest - content-type: application/json - response: - docs: '' - type: crmRoot.CrmContactResponse - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - first_name: Gil - last_name: Feig - account: account - owner: owner - addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - email_addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - email_address: hello@merge.dev - email_address_type: Work - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - phone_number: '+13785579223' - phone_number_type: Mobile - last_activity_at: '2022-02-10T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /contacts - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - ignoreCreate: - path: /crm/v1/contacts/ignore/{model_id} - method: POST - auth: - - tokenAuth: [] - docs: >- - Ignores a specific row based on the `model_id` in the url. These records - will have their properties set to null, and will not be updated in - future syncs. The "reason" and "message" fields in the request body will - be stored for audit purposes. - source: - openapi: crm_v3.yml - path-parameters: - model_id: string - request: - body: crmRoot.IgnoreCommonModelRequest - content-type: application/json - examples: - - path-parameters: - model_id: model_id - headers: - X-Account-Token: X-Account-Token - request: - reason: GENERAL_CUSTOMER_REQUEST - metaPatchRetrieve: - path: /crm/v1/contacts/meta/patch/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `CRMContact` PATCHs. - source: - openapi: crm_v3.yml - path-parameters: - id: string - response: - docs: '' - type: crmRoot.MetaResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - metaPostRetrieve: - path: /crm/v1/contacts/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `CRMContact` POSTs. - source: - openapi: crm_v3.yml - response: - docs: '' - type: crmRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - remoteFieldClassesList: - path: /crm/v1/contacts/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: ContactsRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: crmRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - {} - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/customObjectClasses.yml b/.mock/definition/CRM/customObjectClasses.yml deleted file mode 100644 index abba319aa..000000000 --- a/.mock/definition/CRM/customObjectClasses.yml +++ /dev/null @@ -1,236 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /crm/v1/custom-object-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `CustomObjectClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: CustomObjectClassesListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: crmRoot.PaginatedCustomObjectClassList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 - remote_id: '9579977' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: order - description: Order object - labels: - singular: Order - plural: Orders - fields: - - display_name: Order ID - remote_key_name: order_id - description: The unique ID for the order. - is_required: true - field_type: string - field_format: string - field_choices: - - {} - item_schema: - item_type: null - item_format: null - item_choices: null - - display_name: Order Quantity - remote_key_name: order_quantity - description: The number of items ordered. - is_required: true - field_type: number - field_format: number - field_choices: - - {} - item_schema: - item_type: null - item_format: null - item_choices: null - - display_name: Customer Type - remote_key_name: customer_type - description: The type of customer. - is_required: true - field_type: string - field_format: enumeration - field_choices: - - {} - - {} - association_types: - - key: value - retrieve: - path: /crm/v1/custom-object-classes/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `CustomObjectClass` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - id: string - request: - name: CustomObjectClassesRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: crmRoot.CustomObjectClass - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 - remote_id: '9579977' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: order - description: Order object - labels: - singular: Order - plural: Orders - fields: - - created_at: '2024-01-15T09:30:00Z' - modified_at: '2024-01-15T09:30:00Z' - display_name: Order ID - remote_key_name: order_id - description: The unique ID for the order. - is_required: true - field_type: string - field_format: string - field_choices: - - {} - item_schema: - item_type: null - item_format: null - item_choices: null - - created_at: '2024-01-15T09:30:00Z' - modified_at: '2024-01-15T09:30:00Z' - display_name: Order Quantity - remote_key_name: order_quantity - description: The number of items ordered. - is_required: true - field_type: number - field_format: number - field_choices: - - {} - item_schema: - item_type: null - item_format: null - item_choices: null - - created_at: '2024-01-15T09:30:00Z' - modified_at: '2024-01-15T09:30:00Z' - display_name: Customer Type - remote_key_name: customer_type - description: The type of customer. - is_required: true - field_type: string - field_format: enumeration - field_choices: - - {} - - {} - association_types: - - key: value - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/customObjects.yml b/.mock/definition/CRM/customObjects.yml deleted file mode 100644 index ac8b5453c..000000000 --- a/.mock/definition/CRM/customObjects.yml +++ /dev/null @@ -1,522 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - custom_object_classes_custom_objects_list: - path: /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `CustomObject` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - path-parameters: - custom_object_class_id: string - request: - name: CustomObjectClassesCustomObjectsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: crmRoot.PaginatedCustomObjectList - status-code: 200 - examples: - - path-parameters: - custom_object_class_id: custom_object_class_id - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: da0b1963-be70-469c-9f8c-06a81d0fe759 - remote_id: '4183634295' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - object_class: ff1ff4cb-a66b-47dc-8e2a-50388049e602 - fields: - order_id: '4183634295' - order_quantity: 50 - customer_type: Returning - remote_fields: - - remote_field_class: remote_field_class - custom_object_classes_custom_objects_create: - path: /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects - method: POST - auth: - - tokenAuth: [] - docs: Creates a `CustomObject` object with the given values. - source: - openapi: crm_v3.yml - path-parameters: - custom_object_class_id: string - request: - name: CrmCustomObjectEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: crmRoot.CustomObjectRequest - content-type: application/json - response: - docs: '' - type: crmRoot.CrmCustomObjectResponse - status-code: 201 - examples: - - path-parameters: - custom_object_class_id: custom_object_class_id - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: - fields: - test_field: hello - response: - body: - model: - id: da0b1963-be70-469c-9f8c-06a81d0fe759 - remote_id: '4183634295' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - object_class: ff1ff4cb-a66b-47dc-8e2a-50388049e602 - fields: - order_id: '4183634295' - order_quantity: 50 - customer_type: Returning - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - custom_object_classes_custom_objects_retrieve: - path: >- - /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `CustomObject` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - custom_object_class_id: string - id: string - request: - name: CustomObjectClassesCustomObjectsRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: crmRoot.CustomObject - status-code: 200 - examples: - - path-parameters: - custom_object_class_id: custom_object_class_id - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: da0b1963-be70-469c-9f8c-06a81d0fe759 - remote_id: '4183634295' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - object_class: ff1ff4cb-a66b-47dc-8e2a-50388049e602 - fields: - order_id: '4183634295' - order_quantity: 50 - customer_type: Returning - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - custom_object_classes_custom_objects_meta_post_retrieve: - path: >- - /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `CRMCustomObject` POSTs. - source: - openapi: crm_v3.yml - path-parameters: - custom_object_class_id: string - response: - docs: '' - type: crmRoot.MetaResponse - status-code: 200 - examples: - - path-parameters: - custom_object_class_id: custom_object_class_id - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - custom_object_classes_custom_objects_remote_field_classes_list: - path: /crm/v1/custom-object-classes/custom-objects/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: crmRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - {} - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/deleteAccount.yml b/.mock/definition/CRM/deleteAccount.yml deleted file mode 100644 index 38084283f..000000000 --- a/.mock/definition/CRM/deleteAccount.yml +++ /dev/null @@ -1,17 +0,0 @@ -service: - auth: false - base-path: '' - endpoints: - delete: - path: /crm/v1/delete-account - method: POST - auth: - - tokenAuth: [] - docs: Delete a linked account. - source: - openapi: crm_v3.yml - examples: - - headers: - X-Account-Token: X-Account-Token - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/engagementTypes.yml b/.mock/definition/CRM/engagementTypes.yml deleted file mode 100644 index f4d2dbfd5..000000000 --- a/.mock/definition/CRM/engagementTypes.yml +++ /dev/null @@ -1,243 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /crm/v1/engagement-types - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `EngagementType` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: EngagementTypesListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: crmRoot.PaginatedEngagementTypeList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - activity_type: CALL - name: First Call - remote_fields: - - remote_field_class: remote_field_class - retrieve: - path: /crm/v1/engagement-types/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `EngagementType` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - id: string - request: - name: EngagementTypesRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: crmRoot.EngagementType - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - activity_type: CALL - name: First Call - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - remoteFieldClassesList: - path: /crm/v1/engagement-types/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: EngagementTypesRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: crmRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - {} - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/engagements.yml b/.mock/definition/CRM/engagements.yml deleted file mode 100644 index 194abfdc0..000000000 --- a/.mock/definition/CRM/engagements.yml +++ /dev/null @@ -1,868 +0,0 @@ -types: - EngagementsListRequestExpandItem: - enum: - - account - - contacts - - engagement_type - - owner - source: - openapi: crm_v3.yml - EngagementsRetrieveRequestExpandItem: - enum: - - account - - contacts - - engagement_type - - owner - source: - openapi: crm_v3.yml -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /crm/v1/engagements - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Engagement` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: EngagementsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - started_after: - type: optional - docs: >- - If provided, will only return engagements started after this - datetime. - started_before: - type: optional - docs: >- - If provided, will only return engagements started before this - datetime. - response: - docs: '' - type: crmRoot.PaginatedEngagementList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - started_after: '2024-01-15T09:30:00Z' - started_before: '2024-01-15T09:30:00Z' - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - owner: owner - content: Call for negotiation - subject: Call from customer - direction: INBOUND - engagement_type: engagement_type - start_time: '2022-02-10T00:00:00Z' - end_time: '2022-02-10T00:05:00Z' - account: account - contacts: - - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /engagements - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - create: - path: /crm/v1/engagements - method: POST - auth: - - tokenAuth: [] - docs: Creates an `Engagement` object with the given values. - source: - openapi: crm_v3.yml - request: - name: EngagementEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: crmRoot.EngagementRequest - content-type: application/json - response: - docs: '' - type: crmRoot.EngagementResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - owner: owner - content: Call for negotiation - subject: Call from customer - direction: INBOUND - engagement_type: engagement_type - start_time: '2022-02-10T00:00:00Z' - end_time: '2022-02-10T00:05:00Z' - account: account - contacts: - - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /engagements - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /crm/v1/engagements/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Engagement` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - id: string - request: - name: EngagementsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: crmRoot.Engagement - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - owner: owner - content: Call for negotiation - subject: Call from customer - direction: INBOUND - engagement_type: engagement_type - start_time: '2022-02-10T00:00:00Z' - end_time: '2022-02-10T00:05:00Z' - account: account - contacts: - - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /engagements - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - partialUpdate: - path: /crm/v1/engagements/{id} - method: PATCH - auth: - - tokenAuth: [] - docs: Updates an `Engagement` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - id: string - request: - name: PatchedEngagementEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: crmRoot.PatchedEngagementRequest - content-type: application/json - response: - docs: '' - type: crmRoot.EngagementResponse - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - owner: owner - content: Call for negotiation - subject: Call from customer - direction: INBOUND - engagement_type: engagement_type - start_time: '2022-02-10T00:00:00Z' - end_time: '2022-02-10T00:05:00Z' - account: account - contacts: - - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /engagements - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - metaPatchRetrieve: - path: /crm/v1/engagements/meta/patch/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Engagement` PATCHs. - source: - openapi: crm_v3.yml - path-parameters: - id: string - response: - docs: '' - type: crmRoot.MetaResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - metaPostRetrieve: - path: /crm/v1/engagements/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Engagement` POSTs. - source: - openapi: crm_v3.yml - response: - docs: '' - type: crmRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - remoteFieldClassesList: - path: /crm/v1/engagements/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: EngagementsRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: crmRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - {} - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/fieldMapping.yml b/.mock/definition/CRM/fieldMapping.yml deleted file mode 100644 index efd75ffee..000000000 --- a/.mock/definition/CRM/fieldMapping.yml +++ /dev/null @@ -1,673 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - field_mappings_retrieve: - path: /crm/v1/field-mappings - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all Field Mappings for this Linked Account. Field Mappings are - mappings between third-party Remote Fields and user defined Merge - fields. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - source: - openapi: crm_v3.yml - request: - name: FieldMappingsRetrieveRequest - query-parameters: - exclude_remote_field_metadata: - type: optional - docs: >- - If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and - `remote_fields.schema` will be null). This will increase the speed - of the request since these fields require some calculations. - response: - docs: '' - type: crmRoot.FieldMappingApiInstanceResponse - status-code: 200 - examples: - - query-parameters: - exclude_remote_field_metadata: true - headers: - X-Account-Token: X-Account-Token - response: - body: - Account: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Contact: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Lead: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Note: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Opportunity: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Stage: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - User: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Task: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Engagement: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - field_mappings_create: - path: /crm/v1/field-mappings - method: POST - auth: - - tokenAuth: [] - docs: >- - Create new Field Mappings that will be available after the next - scheduled sync. This will cause the next sync for this Linked Account to - sync **ALL** data from start. - source: - openapi: crm_v3.yml - request: - name: CreateFieldMappingRequest - query-parameters: - exclude_remote_field_metadata: - type: optional - docs: >- - If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and - `remote_fields.schema` will be null). This will increase the speed - of the request since these fields require some calculations. - body: - properties: - target_field_name: - type: string - docs: >- - The name of the target field you want this remote field to map - to. - validation: - minLength: 1 - target_field_description: - type: string - docs: >- - The description of the target field you want this remote field - to map to. - validation: - minLength: 1 - remote_field_traversal_path: - docs: >- - The field traversal path of the remote field listed when you hit - the GET /remote-fields endpoint. - type: list - remote_method: - type: string - docs: >- - The method of the remote endpoint where the remote field is - coming from. - validation: - minLength: 1 - remote_url_path: - type: string - docs: >- - The path of the remote endpoint where the remote field is coming - from. - validation: - minLength: 1 - common_model_name: - type: string - docs: >- - The name of the Common Model that the remote field corresponds - to in a given category. - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: crmRoot.FieldMappingInstanceResponse - status-code: 201 - examples: - - query-parameters: - exclude_remote_field_metadata: true - headers: - X-Account-Token: X-Account-Token - request: - target_field_name: example_target_field_name - target_field_description: this is a example description of the target field - remote_field_traversal_path: - - example_remote_field - remote_method: GET - remote_url_path: /example-url-path - common_model_name: ExampleCommonModel - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - field_mappings_destroy: - path: /crm/v1/field-mappings/{field_mapping_id} - method: DELETE - auth: - - tokenAuth: [] - docs: >- - Deletes Field Mappings for a Linked Account. All data related to this - Field Mapping will be deleted and these changes will be reflected after - the next scheduled sync. This will cause the next sync for this Linked - Account to sync **ALL** data from start. - source: - openapi: crm_v3.yml - path-parameters: - field_mapping_id: string - response: - docs: '' - type: crmRoot.FieldMappingInstanceResponse - status-code: 204 - examples: - - path-parameters: - field_mapping_id: field_mapping_id - headers: - X-Account-Token: X-Account-Token - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - field_mappings_partial_update: - path: /crm/v1/field-mappings/{field_mapping_id} - method: PATCH - auth: - - tokenAuth: [] - docs: >- - Create or update existing Field Mappings for a Linked Account. Changes - will be reflected after the next scheduled sync. This will cause the - next sync for this Linked Account to sync **ALL** data from start. - source: - openapi: crm_v3.yml - path-parameters: - field_mapping_id: string - request: - name: PatchedEditFieldMappingRequest - body: - properties: - remote_field_traversal_path: - type: optional> - docs: >- - The field traversal path of the remote field listed when you hit - the GET /remote-fields endpoint. - remote_method: - type: optional - docs: >- - The method of the remote endpoint where the remote field is - coming from. - validation: - minLength: 1 - remote_url_path: - type: optional - docs: >- - The path of the remote endpoint where the remote field is coming - from. - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: crmRoot.FieldMappingInstanceResponse - status-code: 200 - examples: - - path-parameters: - field_mapping_id: field_mapping_id - headers: - X-Account-Token: X-Account-Token - request: {} - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - remote_fields_retrieve: - path: /crm/v1/remote-fields - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all remote fields for a Linked Account. Remote fields are - third-party fields that are accessible after initial sync if remote_data - is enabled. You can use remote fields to override existing Merge fields - or map a new Merge field. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - source: - openapi: crm_v3.yml - request: - name: RemoteFieldsRetrieveRequest - query-parameters: - common_models: - type: optional - docs: >- - A comma seperated list of Common Model names. If included, will - only return Remote Fields for those Common Models. - include_example_values: - type: optional - docs: >- - If true, will include example values, where available, for remote - fields in the 3rd party platform. These examples come from active - data from your customers. - response: - docs: '' - type: crmRoot.RemoteFieldApiResponse - status-code: 200 - examples: - - query-parameters: - common_models: common_models - include_example_values: include_example_values - headers: - X-Account-Token: X-Account-Token - response: - body: - Account: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Contact: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Lead: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Note: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Opportunity: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Stage: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - User: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Task: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Engagement: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - target_fields_retrieve: - path: /crm/v1/target-fields - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all organization-wide Target Fields, this will not include any - Linked Account specific Target Fields. Organization-wide Target Fields - are additional fields appended to the Merge Common Model for all Linked - Accounts in a category. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). - source: - openapi: crm_v3.yml - response: - docs: '' - type: crmRoot.ExternalTargetFieldApiResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - Account: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Contact: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Lead: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Note: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Opportunity: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Stage: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - User: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Task: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Engagement: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/forceResync.yml b/.mock/definition/CRM/forceResync.yml deleted file mode 100644 index 0e4c7b717..000000000 --- a/.mock/definition/CRM/forceResync.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - sync_status_resync_create: - path: /crm/v1/sync-status/resync - method: POST - auth: - - tokenAuth: [] - docs: >- - Force re-sync of all models. This endpoint is available for monthly, - quarterly, and highest sync frequency customers on the Professional or - Enterprise plans. Doing so will consume a sync credit for the relevant - linked account. Force re-syncs can also be triggered manually in the - Merge Dashboard and is available for all customers. - source: - openapi: crm_v3.yml - response: - docs: '' - type: list - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - - model_name: Account - model_id: crm.Account - last_sync_start: '2021-03-30T19:44:18Z' - next_sync_start: '2021-03-30T20:44:18Z' - last_sync_result: SYNCING - last_sync_finished: '2021-03-30T19:55:18Z' - status: SYNCING - is_initial_sync: true - selective_sync_configurations_usage: IN_NEXT_SYNC - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/generateKey.yml b/.mock/definition/CRM/generateKey.yml deleted file mode 100644 index 939253df9..000000000 --- a/.mock/definition/CRM/generateKey.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /crm/v1/generate-key - method: POST - auth: - - tokenAuth: [] - docs: Create a remote key. - source: - openapi: crm_v3.yml - request: - name: GenerateRemoteKeyRequest - body: - properties: - name: - type: string - docs: The name of the remote key - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: crmRoot.RemoteKey - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - name: Remote Deployment Key 1 - response: - body: - name: Remote Deployment Key 1 - key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/issues.yml b/.mock/definition/CRM/issues.yml deleted file mode 100644 index 5f20722df..000000000 --- a/.mock/definition/CRM/issues.yml +++ /dev/null @@ -1,154 +0,0 @@ -types: - IssuesListRequestStatus: - enum: - - ONGOING - - RESOLVED - source: - openapi: crm_v3.yml -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /crm/v1/issues - method: GET - auth: - - tokenAuth: [] - docs: Gets all issues for Organization. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: IssuesListRequest - query-parameters: - account_token: optional - cursor: - type: optional - docs: The pagination cursor value. - end_date: - type: optional - docs: >- - If included, will only include issues whose most recent action - occurred before this time - end_user_organization_name: optional - first_incident_time_after: - type: optional - docs: >- - If provided, will only return issues whose first incident time was - after this datetime. - first_incident_time_before: - type: optional - docs: >- - If provided, will only return issues whose first incident time was - before this datetime. - include_muted: - type: optional - docs: If true, will include muted issues - integration_name: optional - last_incident_time_after: - type: optional - docs: >- - If provided, will only return issues whose last incident time was - after this datetime. - last_incident_time_before: - type: optional - docs: >- - If provided, will only return issues whose last incident time was - before this datetime. - linked_account_id: - type: optional - docs: >- - If provided, will only include issues pertaining to the linked - account passed in. - page_size: - type: optional - docs: Number of results to return per page. - start_date: - type: optional - docs: >- - If included, will only include issues whose most recent action - occurred after this time - status: - type: optional - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - response: - docs: '' - type: crmRoot.PaginatedIssueList - status-code: 200 - examples: - - query-parameters: - account_token: account_token - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_date: end_date - end_user_organization_name: end_user_organization_name - first_incident_time_after: '2024-01-15T09:30:00Z' - first_incident_time_before: '2024-01-15T09:30:00Z' - include_muted: include_muted - integration_name: integration_name - last_incident_time_after: '2024-01-15T09:30:00Z' - last_incident_time_before: '2024-01-15T09:30:00Z' - linked_account_id: linked_account_id - page_size: 1 - start_date: start_date - status: ONGOING - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: ONGOING - error_description: Missing Permissions - end_user: - key: value - first_incident_time: '2022-12-05T16:19:15Z' - last_incident_time: '2022-12-05T16:19:15Z' - is_muted: true - error_details: - - Missing employee permissions. - - Missing time off permissions. - retrieve: - path: /crm/v1/issues/{id} - method: GET - auth: - - tokenAuth: [] - docs: Get a specific issue. - source: - openapi: crm_v3.yml - path-parameters: - id: string - response: - docs: '' - type: crmRoot.Issue - status-code: 200 - examples: - - path-parameters: - id: id - headers: - X-Account-Token: '[object Object]' - response: - body: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: ONGOING - error_description: Missing Permissions - end_user: - key: value - first_incident_time: '2022-12-05T16:19:15Z' - last_incident_time: '2022-12-05T16:19:15Z' - is_muted: true - error_details: - - Missing employee permissions. - - Missing time off permissions. - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/leads.yml b/.mock/definition/CRM/leads.yml deleted file mode 100644 index 8533bc14d..000000000 --- a/.mock/definition/CRM/leads.yml +++ /dev/null @@ -1,663 +0,0 @@ -types: - LeadsListRequestExpandItem: - enum: - - converted_account - - converted_contact - - owner - source: - openapi: crm_v3.yml - LeadsRetrieveRequestExpandItem: - enum: - - converted_account - - converted_contact - - owner - source: - openapi: crm_v3.yml -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /crm/v1/leads - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Lead` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: LeadsListRequest - query-parameters: - converted_account_id: - type: optional - docs: If provided, will only return leads with this account. - converted_contact_id: - type: optional - docs: If provided, will only return leads with this contact. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - email_addresses: - type: optional - docs: >- - If provided, will only return contacts matching the email - addresses; multiple email_addresses can be separated by commas. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - owner_id: - type: optional - docs: If provided, will only return leads with this owner. - page_size: - type: optional - docs: Number of results to return per page. - phone_numbers: - type: optional - docs: >- - If provided, will only return contacts matching the phone numbers; - multiple phone numbers can be separated by commas. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: crmRoot.PaginatedLeadList - status-code: 200 - examples: - - query-parameters: - converted_account_id: converted_account_id - converted_contact_id: converted_contact_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - email_addresses: email_addresses - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - owner_id: owner_id - page_size: 1 - phone_numbers: phone_numbers - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - owner: owner - lead_source: API Blogger - title: Co-Founder - company: Merge API - first_name: Gil - last_name: Feig - addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - email_addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - email_address: hello@merge.dev - email_address_type: Work - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - phone_number: '+16789932455' - phone_number_type: Mobile - remote_updated_at: '2022-02-10T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - converted_date: '2022-03-10T00:00:00Z' - converted_contact: converted_contact - converted_account: converted_account - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /leads - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - create: - path: /crm/v1/leads - method: POST - auth: - - tokenAuth: [] - docs: Creates a `Lead` object with the given values. - source: - openapi: crm_v3.yml - request: - name: LeadEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: crmRoot.LeadRequest - content-type: application/json - response: - docs: '' - type: crmRoot.LeadResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - owner: owner - lead_source: API Blogger - title: Co-Founder - company: Merge API - first_name: Gil - last_name: Feig - addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - email_addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - email_address: hello@merge.dev - email_address_type: Work - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - phone_number: '+16789932455' - phone_number_type: Mobile - remote_updated_at: '2022-02-10T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - converted_date: '2022-03-10T00:00:00Z' - converted_contact: converted_contact - converted_account: converted_account - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /leads - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /crm/v1/leads/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Lead` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - id: string - request: - name: LeadsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: crmRoot.Lead - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - owner: owner - lead_source: API Blogger - title: Co-Founder - company: Merge API - first_name: Gil - last_name: Feig - addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - street_1: 50 Bowling Green Dr - street_2: Golden Gate Park - city: San Francisco - state: CA - postal_code: '94122' - country: US - address_type: Shipping - email_addresses: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - email_address: hello@merge.dev - email_address_type: Work - phone_numbers: - - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - phone_number: '+16789932455' - phone_number_type: Mobile - remote_updated_at: '2022-02-10T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - converted_date: '2022-03-10T00:00:00Z' - converted_contact: converted_contact - converted_account: converted_account - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /leads - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - metaPostRetrieve: - path: /crm/v1/leads/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Lead` POSTs. - source: - openapi: crm_v3.yml - response: - docs: '' - type: crmRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - remoteFieldClassesList: - path: /crm/v1/leads/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: LeadsRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: crmRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - {} - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/linkToken.yml b/.mock/definition/CRM/linkToken.yml deleted file mode 100644 index b1945f329..000000000 --- a/.mock/definition/CRM/linkToken.yml +++ /dev/null @@ -1,155 +0,0 @@ -imports: - crmRoot: __package__.yml -types: - EndUserDetailsRequestLanguage: - discriminated: false - docs: >- - The following subset of IETF language tags can be used to configure - localization. - - - * `en` - en - - * `de` - de - union: - - crmRoot.LanguageEnum - - string - source: - openapi: crm_v3.yml - inline: true -service: - auth: false - base-path: '' - endpoints: - create: - path: /crm/v1/link-token - method: POST - auth: - - tokenAuth: [] - docs: Creates a link token to be used when linking a new end user. - source: - openapi: crm_v3.yml - request: - name: EndUserDetailsRequest - body: - properties: - end_user_email_address: - type: string - docs: >- - Your end user's email address. This is purely for identification - purposes - setting this value will not cause any emails to be - sent. - validation: - minLength: 1 - maxLength: 100 - end_user_organization_name: - type: string - docs: Your end user's organization. - validation: - minLength: 1 - maxLength: 100 - end_user_origin_id: - type: string - docs: >- - This unique identifier typically represents the ID for your end - user in your product's database. This value must be distinct - from other Linked Accounts' unique identifiers. - validation: - minLength: 1 - maxLength: 100 - categories: - docs: The integration categories to show in Merge Link. - type: list - integration: - type: optional - docs: >- - The slug of a specific pre-selected integration for this linking - flow token. For examples of slugs, see - https://docs.merge.dev/guides/merge-link/single-integration/. - validation: - minLength: 1 - link_expiry_mins: - type: optional - docs: >- - An integer number of minutes between [30, 720 or 10080 if for a - Magic Link URL] for how long this token is valid. Defaults to - 30. - default: 30 - validation: - min: 30 - max: 10080 - should_create_magic_link_url: - type: optional - docs: >- - Whether to generate a Magic Link URL. Defaults to false. For - more information on Magic Link, see - https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - default: false - hide_admin_magic_link: - type: optional - docs: >- - Whether to generate a Magic Link URL on the Admin Needed screen - during the linking flow. Defaults to false. For more information - on Magic Link, see - https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - default: false - common_models: - type: optional> - docs: >- - An array of objects to specify the models and fields that will - be disabled for a given Linked Account. Each object uses - model_id, enabled_actions, and disabled_fields to specify the - model, method, and fields that are scoped for a given Linked - Account. - category_common_model_scopes: - type: >- - optional>>> - docs: >- - When creating a Link Token, you can set permissions for Common - Models that will apply to the account that is going to be - linked. Any model or field not specified in link token payload - will default to existing settings. - language: - type: optional - docs: >- - The following subset of IETF language tags can be used to - configure localization. - - - * `en` - en - - * `de` - de - are_syncs_disabled: - type: optional - docs: >- - The boolean that indicates whether initial, periodic, and force - syncs will be disabled. - default: false - integration_specific_config: - type: optional> - docs: >- - A JSON object containing integration-specific configuration - options. - content-type: application/json - response: - docs: '' - type: crmRoot.LinkToken - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - end_user_email_address: example@gmail.com - end_user_organization_name: Test Organization - end_user_origin_id: '12345' - categories: - - hris - - ats - response: - body: - link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 - integration_name: Lever - magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/linkedAccounts.yml b/.mock/definition/CRM/linkedAccounts.yml deleted file mode 100644 index f938ea57b..000000000 --- a/.mock/definition/CRM/linkedAccounts.yml +++ /dev/null @@ -1,169 +0,0 @@ -types: - LinkedAccountsListRequestCategory: - enum: - - accounting - - ats - - crm - - filestorage - - hris - - mktg - - ticketing - source: - openapi: crm_v3.yml -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /crm/v1/linked-accounts - method: GET - auth: - - tokenAuth: [] - docs: List linked accounts for your organization. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: LinkedAccountsListRequest - query-parameters: - category: - type: optional - docs: >- - Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, - `mktg`, `ticketing` - - - * `hris` - hris - - * `ats` - ats - - * `accounting` - accounting - - * `ticketing` - ticketing - - * `crm` - crm - - * `mktg` - mktg - - * `filestorage` - filestorage - cursor: - type: optional - docs: The pagination cursor value. - end_user_email_address: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given email address. - end_user_organization_name: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given organization name. - end_user_origin_id: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given origin ID. - end_user_origin_ids: - type: optional - docs: >- - Comma-separated list of EndUser origin IDs, making it possible to - specify multiple EndUsers at once. - id: - type: optional - validation: - format: uuid - ids: - type: optional - docs: >- - Comma-separated list of LinkedAccount IDs, making it possible to - specify multiple LinkedAccounts at once. - include_duplicates: - type: optional - docs: >- - If `true`, will include complete production duplicates of the - account specified by the `id` query parameter in the response. - `id` must be for a complete production linked account. - integration_name: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given integration name. - is_test_account: - type: optional - docs: >- - If included, will only include test linked accounts. If not - included, will only include non-test linked accounts. - page_size: - type: optional - docs: Number of results to return per page. - status: - type: optional - docs: >- - Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, - `RELINK_NEEDED` - response: - docs: '' - type: crmRoot.PaginatedAccountDetailsAndActionsList - status-code: 200 - examples: - - query-parameters: - category: accounting - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_user_email_address: end_user_email_address - end_user_organization_name: end_user_organization_name - end_user_origin_id: end_user_origin_id - end_user_origin_ids: end_user_origin_ids - id: id - ids: ids - include_duplicates: true - integration_name: integration_name - is_test_account: is_test_account - page_size: 1 - status: status - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: e59b1821-f85c-4e28-a6b3-1804156f3563 - category: hris - status: COMPLETE - status_detail: Invalid login credentials - end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d - end_user_organization_name: Foo Bar, LLC - end_user_email_address: hradmin@foobar.dev - subdomain: foobar - webhook_listener_url: >- - https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: true - integration: - name: name - categories: - - hris - color: color - slug: slug - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - account_type: PRODUCTION - completed_at: '2024-08-26T20:11:19Z' - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/notes.yml b/.mock/definition/CRM/notes.yml deleted file mode 100644 index de0873c39..000000000 --- a/.mock/definition/CRM/notes.yml +++ /dev/null @@ -1,585 +0,0 @@ -types: - NotesListRequestExpandItem: - enum: - - account - - contact - - opportunity - - owner - source: - openapi: crm_v3.yml - NotesRetrieveRequestExpandItem: - enum: - - account - - contact - - opportunity - - owner - source: - openapi: crm_v3.yml -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /crm/v1/notes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Note` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: NotesListRequest - query-parameters: - account_id: - type: optional - docs: If provided, will only return notes with this account. - contact_id: - type: optional - docs: If provided, will only return notes with this contact. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - opportunity_id: - type: optional - docs: If provided, will only return notes with this opportunity. - owner_id: - type: optional - docs: If provided, will only return notes with this owner. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: crmRoot.PaginatedNoteList - status-code: 200 - examples: - - query-parameters: - account_id: account_id - contact_id: contact_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - opportunity_id: opportunity_id - owner_id: owner_id - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - owner: owner - content: Merge is hiring! - contact: contact - account: account - opportunity: opportunity - remote_updated_at: '2022-02-10T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /notes - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - create: - path: /crm/v1/notes - method: POST - auth: - - tokenAuth: [] - docs: Creates a `Note` object with the given values. - source: - openapi: crm_v3.yml - request: - name: NoteEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: crmRoot.NoteRequest - content-type: application/json - response: - docs: '' - type: crmRoot.NoteResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - owner: owner - content: Merge is hiring! - contact: contact - account: account - opportunity: opportunity - remote_updated_at: '2022-02-10T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /notes - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /crm/v1/notes/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Note` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - id: string - request: - name: NotesRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: crmRoot.Note - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - owner: owner - content: Merge is hiring! - contact: contact - account: account - opportunity: opportunity - remote_updated_at: '2022-02-10T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /notes - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - metaPostRetrieve: - path: /crm/v1/notes/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Note` POSTs. - source: - openapi: crm_v3.yml - response: - docs: '' - type: crmRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - remoteFieldClassesList: - path: /crm/v1/notes/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: NotesRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: crmRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - {} - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/opportunities.yml b/.mock/definition/CRM/opportunities.yml deleted file mode 100644 index 5b149aa5d..000000000 --- a/.mock/definition/CRM/opportunities.yml +++ /dev/null @@ -1,916 +0,0 @@ -types: - OpportunitiesListRequestExpandItem: - enum: - - account - - owner - - stage - source: - openapi: crm_v3.yml - OpportunitiesListRequestStatus: - enum: - - LOST - - OPEN - - WON - source: - openapi: crm_v3.yml - OpportunitiesRetrieveRequestExpandItem: - enum: - - account - - owner - - stage - source: - openapi: crm_v3.yml -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /crm/v1/opportunities - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Opportunity` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: OpportunitiesListRequest - query-parameters: - account_id: - type: optional - docs: If provided, will only return opportunities with this account. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - owner_id: - type: optional - docs: If provided, will only return opportunities with this owner. - page_size: - type: optional - docs: Number of results to return per page. - remote_created_after: - type: optional - docs: >- - If provided, will only return opportunities created in the third - party platform after this datetime. - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - stage_id: - type: optional - docs: If provided, will only return opportunities with this stage. - status: - type: optional - docs: >- - If provided, will only return opportunities with this status. - Options: ('OPEN', 'WON', 'LOST') - - - * `OPEN` - OPEN - - * `WON` - WON - - * `LOST` - LOST - response: - docs: '' - type: crmRoot.PaginatedOpportunityList - status-code: 200 - examples: - - query-parameters: - account_id: account_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - owner_id: owner_id - page_size: 1 - remote_created_after: '2024-01-15T09:30:00Z' - remote_fields: status - remote_id: remote_id - show_enum_origins: status - stage_id: stage_id - status: LOST - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Needs Integrations - description: Needs a Unified API for Integrations! - amount: 100000 - owner: owner - account: account - stage: stage - status: OPEN - last_activity_at: '2022-02-10T00:00:00Z' - close_date: '2022-02-10T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /opportunities - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - create: - path: /crm/v1/opportunities - method: POST - auth: - - tokenAuth: [] - docs: Creates an `Opportunity` object with the given values. - source: - openapi: crm_v3.yml - request: - name: OpportunityEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: crmRoot.OpportunityRequest - content-type: application/json - response: - docs: '' - type: crmRoot.OpportunityResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Needs Integrations - description: Needs a Unified API for Integrations! - amount: 100000 - owner: owner - account: account - stage: stage - status: OPEN - last_activity_at: '2022-02-10T00:00:00Z' - close_date: '2022-02-10T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /opportunities - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /crm/v1/opportunities/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Opportunity` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - id: string - request: - name: OpportunitiesRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: crmRoot.Opportunity - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - remote_fields: status - show_enum_origins: status - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Needs Integrations - description: Needs a Unified API for Integrations! - amount: 100000 - owner: owner - account: account - stage: stage - status: OPEN - last_activity_at: '2022-02-10T00:00:00Z' - close_date: '2022-02-10T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /opportunities - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - partialUpdate: - path: /crm/v1/opportunities/{id} - method: PATCH - auth: - - tokenAuth: [] - docs: Updates an `Opportunity` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - id: string - request: - name: PatchedOpportunityEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: crmRoot.PatchedOpportunityRequest - content-type: application/json - response: - docs: '' - type: crmRoot.OpportunityResponse - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Needs Integrations - description: Needs a Unified API for Integrations! - amount: 100000 - owner: owner - account: account - stage: stage - status: OPEN - last_activity_at: '2022-02-10T00:00:00Z' - close_date: '2022-02-10T00:00:00Z' - remote_created_at: '2021-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /opportunities - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - metaPatchRetrieve: - path: /crm/v1/opportunities/meta/patch/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Opportunity` PATCHs. - source: - openapi: crm_v3.yml - path-parameters: - id: string - response: - docs: '' - type: crmRoot.MetaResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - metaPostRetrieve: - path: /crm/v1/opportunities/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Opportunity` POSTs. - source: - openapi: crm_v3.yml - response: - docs: '' - type: crmRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - remoteFieldClassesList: - path: /crm/v1/opportunities/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: OpportunitiesRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: crmRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - {} - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/passthrough.yml b/.mock/definition/CRM/passthrough.yml deleted file mode 100644 index 98ff45f26..000000000 --- a/.mock/definition/CRM/passthrough.yml +++ /dev/null @@ -1,42 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /crm/v1/passthrough - method: POST - auth: - - tokenAuth: [] - docs: Pull data from an endpoint not currently supported by Merge. - source: - openapi: crm_v3.yml - request: - body: crmRoot.DataPassthroughRequest - content-type: application/json - response: - docs: '' - type: crmRoot.RemoteResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - method: GET - path: /scooters - response: - body: - method: GET - path: /scooters - status: 200 - response: - key: value - response_headers: - X-Page-Token: value - response_type: JSON - headers: - EXTRA-HEADER: value - Authorization: - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/regenerateKey.yml b/.mock/definition/CRM/regenerateKey.yml deleted file mode 100644 index a926ee2a5..000000000 --- a/.mock/definition/CRM/regenerateKey.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /crm/v1/regenerate-key - method: POST - auth: - - tokenAuth: [] - docs: Exchange remote keys. - source: - openapi: crm_v3.yml - request: - name: RemoteKeyForRegenerationRequest - body: - properties: - name: - type: string - docs: The name of the remote key - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: crmRoot.RemoteKey - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - name: Remote Deployment Key 1 - response: - body: - name: Remote Deployment Key 1 - key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/scopes.yml b/.mock/definition/CRM/scopes.yml deleted file mode 100644 index 1c60baaea..000000000 --- a/.mock/definition/CRM/scopes.yml +++ /dev/null @@ -1,167 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - default_scopes_retrieve: - path: /crm/v1/default-scopes - method: GET - auth: - - tokenAuth: [] - docs: >- - Get the default permissions for Merge Common Models and fields across - all Linked Accounts of a given category. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - source: - openapi: crm_v3.yml - response: - docs: '' - type: crmRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - linked_account_scopes_retrieve: - path: /crm/v1/linked-account-scopes - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all available permissions for Merge Common Models and fields for a - single Linked Account. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - source: - openapi: crm_v3.yml - response: - docs: '' - type: crmRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - linked_account_scopes_create: - path: /crm/v1/linked-account-scopes - method: POST - auth: - - tokenAuth: [] - docs: >- - Update permissions for any Common Model or field for a single Linked - Account. Any Scopes not set in this POST request will inherit the - default Scopes. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) - source: - openapi: crm_v3.yml - request: - name: LinkedAccountCommonModelScopeDeserializerRequest - body: - properties: - common_models: - docs: The common models you want to update the scopes for - type: list - content-type: application/json - response: - docs: '' - type: crmRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - home_location - disabled_fields: - - work_location - - model_name: Benefit - model_permissions: - WRITE: - is_enabled: false - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/stages.yml b/.mock/definition/CRM/stages.yml deleted file mode 100644 index 74830b933..000000000 --- a/.mock/definition/CRM/stages.yml +++ /dev/null @@ -1,261 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /crm/v1/stages - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Stage` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: StagesListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: crmRoot.PaginatedStageList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 0358cbc6-2040-430a-848e-aafacbadf3aa - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Closed Won - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /stages - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - retrieve: - path: /crm/v1/stages/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Stage` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - id: string - request: - name: StagesRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: crmRoot.Stage - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 0358cbc6-2040-430a-848e-aafacbadf3aa - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Closed Won - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /stages - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - remoteFieldClassesList: - path: /crm/v1/stages/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: StagesRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: crmRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - {} - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/syncStatus.yml b/.mock/definition/CRM/syncStatus.yml deleted file mode 100644 index ec796fcbf..000000000 --- a/.mock/definition/CRM/syncStatus.yml +++ /dev/null @@ -1,60 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /crm/v1/sync-status - method: GET - auth: - - tokenAuth: [] - docs: >- - Get sync status for the current sync and the most recently finished - sync. `last_sync_start` represents the most recent time any sync began. - `last_sync_finished` represents the most recent time any sync completed. - These timestamps may correspond to different sync instances which may - result in a sync start time being later than a separate sync completed - time. To ensure you are retrieving the latest available data reference - the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. - Possible values for `status` and `last_sync_result` are `DISABLED`, - `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more - about sync status in our [Help - Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). - source: - openapi: crm_v3.yml - request: - name: SyncStatusListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: crmRoot.PaginatedSyncStatusList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - model_name: Account - model_id: crm.Account - last_sync_start: '2021-03-30T19:44:18Z' - next_sync_start: '2021-03-30T20:44:18Z' - last_sync_result: SYNCING - last_sync_finished: '2021-03-30T19:55:18Z' - status: SYNCING - is_initial_sync: true - selective_sync_configurations_usage: IN_NEXT_SYNC - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/tasks.yml b/.mock/definition/CRM/tasks.yml deleted file mode 100644 index b91eaeb7d..000000000 --- a/.mock/definition/CRM/tasks.yml +++ /dev/null @@ -1,846 +0,0 @@ -types: - TasksListRequestExpandItem: - enum: - - account - - opportunity - - owner - source: - openapi: crm_v3.yml - TasksRetrieveRequestExpandItem: - enum: - - account - - opportunity - - owner - source: - openapi: crm_v3.yml -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /crm/v1/tasks - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Task` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: TasksListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: crmRoot.PaginatedTaskList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - subject: Contact about Integration Strategy - content: Follow up to see whether they need integrations - owner: owner - account: account - opportunity: opportunity - completed_date: '2022-02-11T00:00:00Z' - due_date: '2022-02-10T00:00:00Z' - status: OPEN - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /tasks - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - create: - path: /crm/v1/tasks - method: POST - auth: - - tokenAuth: [] - docs: Creates a `Task` object with the given values. - source: - openapi: crm_v3.yml - request: - name: TaskEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: crmRoot.TaskRequest - content-type: application/json - response: - docs: '' - type: crmRoot.TaskResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - subject: Contact about Integration Strategy - content: Follow up to see whether they need integrations - owner: owner - account: account - opportunity: opportunity - completed_date: '2022-02-11T00:00:00Z' - due_date: '2022-02-10T00:00:00Z' - status: OPEN - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /tasks - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /crm/v1/tasks/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Task` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - id: string - request: - name: TasksRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: crmRoot.Task - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - subject: Contact about Integration Strategy - content: Follow up to see whether they need integrations - owner: owner - account: account - opportunity: opportunity - completed_date: '2022-02-11T00:00:00Z' - due_date: '2022-02-10T00:00:00Z' - status: OPEN - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /tasks - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - partialUpdate: - path: /crm/v1/tasks/{id} - method: PATCH - auth: - - tokenAuth: [] - docs: Updates a `Task` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - id: string - request: - name: PatchedTaskEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: crmRoot.PatchedTaskRequest - content-type: application/json - response: - docs: '' - type: crmRoot.TaskResponse - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 550e8400-e29b-41d4-a716-446655440000 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - subject: Contact about Integration Strategy - content: Follow up to see whether they need integrations - owner: owner - account: account - opportunity: opportunity - completed_date: '2022-02-11T00:00:00Z' - due_date: '2022-02-10T00:00:00Z' - status: OPEN - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /tasks - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - metaPatchRetrieve: - path: /crm/v1/tasks/meta/patch/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Task` PATCHs. - source: - openapi: crm_v3.yml - path-parameters: - id: string - response: - docs: '' - type: crmRoot.MetaResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - metaPostRetrieve: - path: /crm/v1/tasks/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Task` POSTs. - source: - openapi: crm_v3.yml - response: - docs: '' - type: crmRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - remoteFieldClassesList: - path: /crm/v1/tasks/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: TasksRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: crmRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - {} - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/users.yml b/.mock/definition/CRM/users.yml deleted file mode 100644 index 350a5a29e..000000000 --- a/.mock/definition/CRM/users.yml +++ /dev/null @@ -1,293 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /crm/v1/users - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `User` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: UsersListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - email: - type: optional - docs: If provided, will only return users with this email. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: crmRoot.PaginatedUserList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - email: email - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 0358cbc6-2040-430a-848e-aafacbadf3aa - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Gil Feig - email: merge_is_hiring@merge.dev - is_active: true - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /users - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - retrieve: - path: /crm/v1/users/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `User` object with the given `id`. - source: - openapi: crm_v3.yml - path-parameters: - id: string - request: - name: UsersRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: crmRoot.User - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 0358cbc6-2040-430a-848e-aafacbadf3aa - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Gil Feig - email: merge_is_hiring@merge.dev - is_active: true - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /users - data: - - Varies by platform - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - ignoreCreate: - path: /crm/v1/users/ignore/{model_id} - method: POST - auth: - - tokenAuth: [] - docs: >- - Ignores a specific row based on the `model_id` in the url. These records - will have their properties set to null, and will not be updated in - future syncs. The "reason" and "message" fields in the request body will - be stored for audit purposes. - source: - openapi: crm_v3.yml - path-parameters: - model_id: string - request: - body: crmRoot.IgnoreCommonModelRequest - content-type: application/json - examples: - - path-parameters: - model_id: model_id - headers: - X-Account-Token: X-Account-Token - request: - reason: GENERAL_CUSTOMER_REQUEST - remoteFieldClassesList: - path: /crm/v1/users/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: crm_v3.yml - request: - name: UsersRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: crmRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_required: true - field_type: string - field_format: string - field_choices: - - {} - source: - openapi: crm_v3.yml diff --git a/.mock/definition/CRM/webhookReceivers.yml b/.mock/definition/CRM/webhookReceivers.yml deleted file mode 100644 index 03ae2b0cd..000000000 --- a/.mock/definition/CRM/webhookReceivers.yml +++ /dev/null @@ -1,65 +0,0 @@ -imports: - crmRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /crm/v1/webhook-receivers - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `WebhookReceiver` objects. - source: - openapi: crm_v3.yml - response: - docs: '' - type: list - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - - event: event - is_active: true - key: key - create: - path: /crm/v1/webhook-receivers - method: POST - auth: - - tokenAuth: [] - docs: Creates a `WebhookReceiver` object with the given values. - source: - openapi: crm_v3.yml - request: - name: WebhookReceiverRequest - body: - properties: - event: - type: string - validation: - minLength: 1 - is_active: boolean - key: - type: optional - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: crmRoot.WebhookReceiver - status-code: 201 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - event: event - is_active: true - response: - body: - event: event - is_active: true - key: key - source: - openapi: crm_v3.yml diff --git a/.mock/definition/FileStorage/__package__.yml b/.mock/definition/FileStorage/__package__.yml deleted file mode 100644 index f07c96e32..000000000 --- a/.mock/definition/FileStorage/__package__.yml +++ /dev/null @@ -1,2404 +0,0 @@ -types: - AccountDetailsCategory: - discriminated: false - union: - - CategoryEnum - - string - source: - openapi: filestorage_v3.yml - inline: true - AccountDetails: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - integration: - type: optional - access: read-only - integration_slug: - type: optional - access: read-only - category: optional - end_user_origin_id: - type: optional - access: read-only - end_user_organization_name: - type: optional - access: read-only - end_user_email_address: - type: optional - validation: - format: email - access: read-only - status: - type: optional - access: read-only - webhook_listener_url: - type: optional - validation: - format: uri - access: read-only - is_duplicate: - type: optional - docs: >- - Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test - Linked Accounts, incomplete Production Linked Accounts, and ignored - duplicate Production Linked Account sets. - access: read-only - account_type: - type: optional - access: read-only - completed_at: - type: optional - docs: The time at which account completes the linking flow. - source: - openapi: filestorage_v3.yml - AccountDetailsAndActionsCategory: - discriminated: false - union: - - CategoryEnum - - string - source: - openapi: filestorage_v3.yml - inline: true - AccountDetailsAndActionsStatus: - discriminated: false - union: - - AccountDetailsAndActionsStatusEnum - - string - source: - openapi: filestorage_v3.yml - inline: true - AccountDetailsAndActions: - docs: >- - # The LinkedAccount Object - - ### Description - - The `LinkedAccount` object is used to represent an end user's link with a - specific integration. - - - ### Usage Example - - View a list of your organization's `LinkedAccount` objects. - properties: - id: string - category: optional - status: AccountDetailsAndActionsStatus - status_detail: optional - end_user_origin_id: optional - end_user_organization_name: string - end_user_email_address: string - subdomain: - type: optional - docs: The tenant or domain the customer has provided access to. - webhook_listener_url: string - is_duplicate: - type: optional - docs: >- - Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test - Linked Accounts, incomplete Production Linked Accounts, and ignored - duplicate Production Linked Account sets. - integration: optional - account_type: string - completed_at: datetime - source: - openapi: filestorage_v3.yml - AccountDetailsAndActionsIntegration: - properties: - name: string - categories: list - image: optional - square_image: optional - color: string - slug: string - passthrough_available: boolean - available_model_operations: optional> - source: - openapi: filestorage_v3.yml - AccountDetailsAndActionsStatusEnum: - enum: - - COMPLETE - - INCOMPLETE - - RELINK_NEEDED - - IDLE - docs: |- - * `COMPLETE` - COMPLETE - * `INCOMPLETE` - INCOMPLETE - * `RELINK_NEEDED` - RELINK_NEEDED - * `IDLE` - IDLE - source: - openapi: filestorage_v3.yml - AccountIntegration: - properties: - name: - type: string - docs: Company name. - abbreviated_name: - type: optional - docs: >- - Optional. This shortened name appears in places with limited space, - usually in conjunction with the platform's logo (e.g., Merge Link - menu).

Example: Workforce Now (in lieu of ADP Workforce - Now), SuccessFactors (in lieu of SAP SuccessFactors) - categories: - type: optional> - docs: >- - Category or categories this integration belongs to. Multiple - categories should be comma separated, i.e. [ats, hris]. - access: read-only - image: - type: optional - docs: Company logo in rectangular shape. - validation: - format: uri - square_image: - type: optional - docs: Company logo in square shape. - validation: - format: uri - color: - type: optional - docs: >- - The color of this integration used for buttons and text throughout the - app and landing pages. Choose a darker, saturated color. - validation: - pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ - maxLength: 18 - slug: - type: optional - access: read-only - api_endpoints_to_documentation_urls: - type: optional> - docs: >- - Mapping of API endpoints to documentation urls for support. Example: - {'GET': [['/common-model-scopes', - 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', - 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], - 'POST': []} - webhook_setup_guide_url: - type: optional - docs: >- - Setup guide URL for third party webhook creation. Exposed in Merge - Docs. - category_beta_status: - type: optional> - docs: Category or categories this integration is in beta status for. - access: read-only - source: - openapi: filestorage_v3.yml - AccountToken: - properties: - account_token: string - integration: AccountIntegration - id: string - source: - openapi: filestorage_v3.yml - AdvancedMetadata: - properties: - id: - type: string - validation: - format: uuid - display_name: optional - description: optional - is_required: optional - is_custom: optional - field_choices: optional> - source: - openapi: filestorage_v3.yml - AsyncPassthroughReciept: - properties: - async_passthrough_receipt_id: - type: string - validation: - format: uuid - source: - openapi: filestorage_v3.yml - AuditLogEventRole: - discriminated: false - docs: >- - Designates the role of the user (or SYSTEM/API if action not taken by a - user) at the time of this Event occurring. - - - * `ADMIN` - ADMIN - - * `DEVELOPER` - DEVELOPER - - * `MEMBER` - MEMBER - - * `API` - API - - * `SYSTEM` - SYSTEM - - * `MERGE_TEAM` - MERGE_TEAM - union: - - RoleEnum - - string - source: - openapi: filestorage_v3.yml - inline: true - AuditLogEventEventType: - discriminated: false - docs: >- - Designates the type of event that occurred. - - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - union: - - EventTypeEnum - - string - source: - openapi: filestorage_v3.yml - inline: true - AuditLogEvent: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - user_name: - type: optional - docs: The User's full name at the time of this Event occurring. - validation: - maxLength: 200 - user_email: - type: optional - docs: The User's email at the time of this Event occurring. - validation: - format: email - maxLength: 254 - role: - type: AuditLogEventRole - docs: >- - Designates the role of the user (or SYSTEM/API if action not taken by - a user) at the time of this Event occurring. - - - * `ADMIN` - ADMIN - - * `DEVELOPER` - DEVELOPER - - * `MEMBER` - MEMBER - - * `API` - API - - * `SYSTEM` - SYSTEM - - * `MERGE_TEAM` - MERGE_TEAM - ip_address: - type: string - validation: - maxLength: 45 - event_type: - type: AuditLogEventEventType - docs: >- - Designates the type of event that occurred. - - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - event_description: string - created_at: - type: optional - access: read-only - source: - openapi: filestorage_v3.yml - AvailableActions: - docs: >- - # The AvailableActions Object - - ### Description - - The `Activity` object is used to see all available model/operation - combinations for an integration. - - - ### Usage Example - - Fetch all the actions available for the `Zenefits` integration. - properties: - integration: AccountIntegration - passthrough_available: boolean - available_model_operations: optional> - source: - openapi: filestorage_v3.yml - CategoriesEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - docs: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - source: - openapi: filestorage_v3.yml - CategoryEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - docs: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - source: - openapi: filestorage_v3.yml - CommonModelScopeApi: - properties: - common_models: - docs: The common models you want to update the scopes for - type: list - source: - openapi: filestorage_v3.yml - CommonModelScopesBodyRequest: - properties: - model_id: - type: string - validation: - minLength: 1 - enabled_actions: list - disabled_fields: list - source: - openapi: filestorage_v3.yml - DataPassthroughRequest: - docs: >- - # The DataPassthrough Object - - ### Description - - The `DataPassthrough` object is used to send information to an - otherwise-unsupported third-party endpoint. - - - ### Usage Example - - Create a `DataPassthrough` to get team hierarchies from your Rippling - integration. - properties: - method: MethodEnum - path: - type: string - docs: The path of the request in the third party's platform. - validation: - minLength: 1 - base_url_override: - type: optional - docs: An optional override of the third party's base url for the request. - validation: - minLength: 1 - data: - type: optional - docs: >- - The data with the request. You must include a `request_format` - parameter matching the data's format - validation: - minLength: 1 - multipart_form_data: - type: optional> - docs: >- - Pass an array of `MultipartFormField` objects in here instead of using - the `data` param if `request_format` is set to `MULTIPART`. - headers: - type: optional> - docs: >- - The headers to use for the request (Merge will handle the account's - authorization headers). `Content-Type` header is required for - passthrough. Choose content type corresponding to expected format of - receiving server. - request_format: optional - normalize_response: - type: optional - docs: >- - Optional. If true, the response will always be an object of the form - `{"type": T, "value": ...}` where `T` will be one of `string, boolean, - number, null, array, object`. - source: - openapi: filestorage_v3.yml - DebugModeLog: - properties: - log_id: string - dashboard_view: string - log_summary: DebugModelLogSummary - source: - openapi: filestorage_v3.yml - DebugModelLogSummary: - properties: - url: string - method: string - status_code: integer - source: - openapi: filestorage_v3.yml - DownloadRequestMeta: - properties: - id: string - url: string - method: string - headers: map - source: - openapi: filestorage_v3.yml - Drive: - docs: >- - # The Drive Object - - ### Description - - The `Drive` object is used to represent a drive that contains the folders - and files in the user's workspace. - - ### Usage Example - - Fetch from the `GET /api/filestorage/v1/drives` endpoint and view their - drives. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The drive's name. - validation: - maxLength: 254 - remote_created_at: - type: optional - docs: When the third party's drive was created. - drive_url: - type: optional - docs: The drive's url. - validation: - maxLength: 2000 - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: filestorage_v3.yml - EnabledActionsEnum: - enum: - - READ - - WRITE - docs: |- - * `READ` - READ - * `WRITE` - WRITE - source: - openapi: filestorage_v3.yml - EncodingEnum: - enum: - - RAW - - BASE64 - - GZIP_BASE64 - docs: |- - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - source: - openapi: filestorage_v3.yml - ErrorValidationProblem: - properties: - source: optional - title: string - detail: string - problem_type: string - source: - openapi: filestorage_v3.yml - EventTypeEnum: - enum: - - CREATED_REMOTE_PRODUCTION_API_KEY - - DELETED_REMOTE_PRODUCTION_API_KEY - - CREATED_TEST_API_KEY - - DELETED_TEST_API_KEY - - REGENERATED_PRODUCTION_API_KEY - - REGENERATED_WEBHOOK_SIGNATURE - - INVITED_USER - - TWO_FACTOR_AUTH_ENABLED - - TWO_FACTOR_AUTH_DISABLED - - DELETED_LINKED_ACCOUNT - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - CREATED_DESTINATION - - DELETED_DESTINATION - - CHANGED_DESTINATION - - CHANGED_SCOPES - - CHANGED_PERSONAL_INFORMATION - - CHANGED_ORGANIZATION_SETTINGS - - ENABLED_INTEGRATION - - DISABLED_INTEGRATION - - ENABLED_CATEGORY - - DISABLED_CATEGORY - - CHANGED_PASSWORD - - RESET_PASSWORD - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - FORCED_LINKED_ACCOUNT_RESYNC - - MUTED_ISSUE - - GENERATED_MAGIC_LINK - - ENABLED_MERGE_WEBHOOK - - DISABLED_MERGE_WEBHOOK - - MERGE_WEBHOOK_TARGET_CHANGED - - END_USER_CREDENTIALS_ACCESSED - docs: >- - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - source: - openapi: filestorage_v3.yml - ExternalTargetFieldApi: - properties: - name: - type: optional - access: read-only - description: - type: optional - access: read-only - is_mapped: - type: optional - access: read-only - source: - openapi: filestorage_v3.yml - ExternalTargetFieldApiResponse: - properties: - File: optional> - Folder: optional> - Drive: optional> - Group: optional> - User: optional> - source: - openapi: filestorage_v3.yml - FieldMappingApiInstanceTargetField: - properties: - name: string - description: string - is_organization_wide: boolean - source: - openapi: filestorage_v3.yml - inline: true - FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: - properties: - method: optional - url_path: optional - field_traversal_path: optional> - source: - openapi: filestorage_v3.yml - inline: true - FieldMappingApiInstanceRemoteField: - properties: - remote_key_name: optional - schema: optional> - remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - source: - openapi: filestorage_v3.yml - inline: true - FieldMappingApiInstance: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - is_integration_wide: - type: optional - access: read-only - target_field: - type: optional - access: read-only - remote_field: - type: optional - access: read-only - source: - openapi: filestorage_v3.yml - FieldMappingApiInstanceResponse: - properties: - File: optional> - Folder: optional> - Drive: optional> - Group: optional> - User: optional> - source: - openapi: filestorage_v3.yml - FieldMappingInstanceResponse: - properties: - model: FieldMappingApiInstance - warnings: list - errors: list - logs: optional> - source: - openapi: filestorage_v3.yml - FieldPermissionDeserializer: - properties: - enabled_fields: optional> - disabled_fields: optional> - source: - openapi: filestorage_v3.yml - FieldPermissionDeserializerRequest: - properties: - enabled_fields: optional> - disabled_fields: optional> - source: - openapi: filestorage_v3.yml - FileFolder: - discriminated: false - docs: The folder that the file belongs to. - union: - - type: string - validation: - format: uuid - - Folder - source: - openapi: filestorage_v3.yml - inline: true - FilePermissionsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Permission - source: - openapi: filestorage_v3.yml - inline: true - FilePermissions: - discriminated: false - docs: >- - The Permission object is used to represent a user's or group's access to a - File or Folder. Permissions are unexpanded by default. Use the query param - `expand=permissions` to see more details under `GET /files`. - union: - - type: string - validation: - format: uuid - - Permission - - list - source: - openapi: filestorage_v3.yml - inline: true - FileDrive: - discriminated: false - docs: The drive that the file belongs to. - union: - - type: string - validation: - format: uuid - - Drive - source: - openapi: filestorage_v3.yml - inline: true - File: - docs: >- - # The File Object - - ### Description - - The `File` object is used to represent a file in the workspace. The Object - typically exists under a folder or drive, if it exists. - - ### Usage Example - - Fetch from the `GET /api/filestorage/v1/files` endpoint and view their - files. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The file's name. - validation: - maxLength: 254 - file_url: - type: optional - docs: The URL to access the file. - validation: - maxLength: 2000 - file_thumbnail_url: - type: optional - docs: >- - The URL that produces a thumbnail preview of the file. Typically an - image. - validation: - maxLength: 2000 - size: - type: optional - docs: The file's size, in bytes. - mime_type: - type: optional - docs: The file's mime type. - validation: - maxLength: 128 - description: - type: optional - docs: The file's description. - validation: - maxLength: 2000 - folder: - type: optional - docs: The folder that the file belongs to. - checksum: - type: optional> - docs: >- - This field stores file checksum data. 'type' indicates the algorithm - (e.g. crc_32, sha1, sha256, quickXor, or md5), and 'content_hash' is - the unique hash used to verify file integrity and detect alterations. - permissions: - type: optional - docs: >- - The Permission object is used to represent a user's or group's access - to a File or Folder. Permissions are unexpanded by default. Use the - query param `expand=permissions` to see more details under `GET - /files`. - drive: - type: optional - docs: The drive that the file belongs to. - remote_created_at: - type: optional - docs: When the third party's file was created. - remote_updated_at: - type: optional - docs: When the third party's file was updated. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: filestorage_v3.yml - FileRequestFolder: - discriminated: false - docs: The folder that the file belongs to. - union: - - type: string - validation: - format: uuid - - Folder - source: - openapi: filestorage_v3.yml - inline: true - FileRequestPermissionsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - PermissionRequest - source: - openapi: filestorage_v3.yml - inline: true - FileRequestPermissions: - discriminated: false - docs: >- - The Permission object is used to represent a user's or group's access to a - File or Folder. Permissions are unexpanded by default. Use the query param - `expand=permissions` to see more details under `GET /files`. - union: - - type: string - validation: - format: uuid - - PermissionRequest - - list - source: - openapi: filestorage_v3.yml - inline: true - FileRequestDrive: - discriminated: false - docs: The drive that the file belongs to. - union: - - type: string - validation: - format: uuid - - Drive - source: - openapi: filestorage_v3.yml - inline: true - FileRequest: - docs: >- - # The File Object - - ### Description - - The `File` object is used to represent a file in the workspace. The Object - typically exists under a folder or drive, if it exists. - - ### Usage Example - - Fetch from the `GET /api/filestorage/v1/files` endpoint and view their - files. - properties: - name: - type: optional - docs: The file's name. - validation: - maxLength: 254 - file_url: - type: optional - docs: The URL to access the file. - validation: - maxLength: 2000 - file_thumbnail_url: - type: optional - docs: >- - The URL that produces a thumbnail preview of the file. Typically an - image. - validation: - maxLength: 2000 - size: - type: optional - docs: The file's size, in bytes. - mime_type: - type: optional - docs: The file's mime type. - validation: - maxLength: 128 - description: - type: optional - docs: The file's description. - validation: - maxLength: 2000 - folder: - type: optional - docs: The folder that the file belongs to. - checksum: - type: optional> - docs: >- - This field stores file checksum data. 'type' indicates the algorithm - (e.g. crc_32, sha1, sha256, quickXor, or md5), and 'content_hash' is - the unique hash used to verify file integrity and detect alterations. - permissions: - type: optional - docs: >- - The Permission object is used to represent a user's or group's access - to a File or Folder. Permissions are unexpanded by default. Use the - query param `expand=permissions` to see more details under `GET - /files`. - drive: - type: optional - docs: The drive that the file belongs to. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: filestorage_v3.yml - FileStorageFileResponse: - properties: - model: File - warnings: list - errors: list - logs: optional> - source: - openapi: filestorage_v3.yml - FileStorageFolderResponse: - properties: - model: Folder - warnings: list - errors: list - logs: optional> - source: - openapi: filestorage_v3.yml - FolderParentFolder: - discriminated: false - docs: The folder that the folder belongs to. - union: - - type: string - validation: - format: uuid - - Folder - source: - openapi: filestorage_v3.yml - inline: true - FolderDrive: - discriminated: false - docs: The drive that the folder belongs to. - union: - - type: string - validation: - format: uuid - - Drive - source: - openapi: filestorage_v3.yml - inline: true - FolderPermissionsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Permission - source: - openapi: filestorage_v3.yml - inline: true - FolderPermissions: - discriminated: false - docs: >- - The Permission object is used to represent a user's or group's access to a - File or Folder. Permissions are unexpanded by default. Use the query param - `expand=permissions` to see more details under `GET /folders`. - union: - - type: string - validation: - format: uuid - - Permission - - list - source: - openapi: filestorage_v3.yml - inline: true - Folder: - docs: >- - # The Folder Object - - ### Description - - The `Folder` object is used to represent a collection of files and/or - folders in the workspace. Could be within a drive, if it exists. - - ### Usage Example - - Fetch from the `GET /api/filestorage/v1/folders` endpoint and view their - folders. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The folder's name. - validation: - maxLength: 254 - folder_url: - type: optional - docs: The URL to access the folder. - validation: - maxLength: 2000 - size: - type: optional - docs: The folder's size, in bytes. - description: - type: optional - docs: The folder's description. - validation: - maxLength: 2000 - parent_folder: - type: optional - docs: The folder that the folder belongs to. - drive: - type: optional - docs: The drive that the folder belongs to. - permissions: - type: optional - docs: >- - The Permission object is used to represent a user's or group's access - to a File or Folder. Permissions are unexpanded by default. Use the - query param `expand=permissions` to see more details under `GET - /folders`. - remote_created_at: - type: optional - docs: When the third party's folder was created. - remote_updated_at: - type: optional - docs: When the third party's folder was updated. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: filestorage_v3.yml - FolderRequestParentFolder: - discriminated: false - docs: The folder that the folder belongs to. - union: - - type: string - validation: - format: uuid - - Folder - source: - openapi: filestorage_v3.yml - inline: true - FolderRequestDrive: - discriminated: false - docs: The drive that the folder belongs to. - union: - - type: string - validation: - format: uuid - - Drive - source: - openapi: filestorage_v3.yml - inline: true - FolderRequestPermissionsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - PermissionRequest - source: - openapi: filestorage_v3.yml - inline: true - FolderRequestPermissions: - discriminated: false - docs: >- - The Permission object is used to represent a user's or group's access to a - File or Folder. Permissions are unexpanded by default. Use the query param - `expand=permissions` to see more details under `GET /folders`. - union: - - type: string - validation: - format: uuid - - PermissionRequest - - list - source: - openapi: filestorage_v3.yml - inline: true - FolderRequest: - docs: >- - # The Folder Object - - ### Description - - The `Folder` object is used to represent a collection of files and/or - folders in the workspace. Could be within a drive, if it exists. - - ### Usage Example - - Fetch from the `GET /api/filestorage/v1/folders` endpoint and view their - folders. - properties: - name: - type: optional - docs: The folder's name. - validation: - maxLength: 254 - folder_url: - type: optional - docs: The URL to access the folder. - validation: - maxLength: 2000 - size: - type: optional - docs: The folder's size, in bytes. - description: - type: optional - docs: The folder's description. - validation: - maxLength: 2000 - parent_folder: - type: optional - docs: The folder that the folder belongs to. - drive: - type: optional - docs: The drive that the folder belongs to. - permissions: - type: optional - docs: >- - The Permission object is used to represent a user's or group's access - to a File or Folder. Permissions are unexpanded by default. Use the - query param `expand=permissions` to see more details under `GET - /folders`. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: filestorage_v3.yml - GroupChildGroupsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Group - source: - openapi: filestorage_v3.yml - inline: true - Group: - docs: >- - # The Group Object - - ### Description - - The `Group` object is used to represent any subset of `Users`. This can - extend to company domains as well. - - ### Usage Example - - Fetch from the `GET /api/filestorage/v1/groups` endpoint and view their - groups. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The group's name. - validation: - maxLength: 254 - users: - docs: >- - The users that belong in the group. If null, this typically means it's - either a domain or the third-party platform does not surface this - information. - type: list - child_groups: - type: optional> - docs: Groups that inherit the permissions of the parent group. - access: read-only - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: filestorage_v3.yml - IndividualCommonModelScopeDeserializer: - properties: - model_name: string - model_permissions: optional> - field_permissions: optional - source: - openapi: filestorage_v3.yml - IndividualCommonModelScopeDeserializerRequest: - properties: - model_name: - type: string - validation: - minLength: 1 - model_permissions: optional> - field_permissions: optional - source: - openapi: filestorage_v3.yml - IssueStatus: - discriminated: false - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - union: - - IssueStatusEnum - - string - source: - openapi: filestorage_v3.yml - inline: true - Issue: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - status: - type: optional - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - error_description: string - end_user: - type: optional> - access: read-only - first_incident_time: optional - last_incident_time: optional - is_muted: - type: optional - access: read-only - error_details: - type: optional> - access: read-only - source: - openapi: filestorage_v3.yml - IssueStatusEnum: - enum: - - ONGOING - - RESOLVED - docs: |- - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - source: - openapi: filestorage_v3.yml - LanguageEnum: - enum: - - en - - de - docs: |- - * `en` - en - * `de` - de - source: - openapi: filestorage_v3.yml - LastSyncResultEnum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - docs: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - source: - openapi: filestorage_v3.yml - LinkToken: - properties: - link_token: string - integration_name: optional - magic_link_url: optional - source: - openapi: filestorage_v3.yml - LinkedAccountStatus: - properties: - linked_account_status: string - can_make_request: boolean - source: - openapi: filestorage_v3.yml - MetaResponse: - properties: - request_schema: map - remote_field_classes: optional> - status: optional - has_conditional_params: boolean - has_required_linked_account_params: boolean - source: - openapi: filestorage_v3.yml - MethodEnum: - enum: - - GET - - OPTIONS - - HEAD - - POST - - PUT - - PATCH - - DELETE - docs: |- - * `GET` - GET - * `OPTIONS` - OPTIONS - * `HEAD` - HEAD - * `POST` - POST - * `PUT` - PUT - * `PATCH` - PATCH - * `DELETE` - DELETE - source: - openapi: filestorage_v3.yml - ModelOperation: - docs: >- - # The ModelOperation Object - - ### Description - - The `ModelOperation` object is used to represent the operations that are - currently supported for a given model. - - - ### Usage Example - - View what operations are supported for the `Candidate` endpoint. - properties: - model_name: string - available_operations: list - required_post_parameters: list - supported_fields: list - source: - openapi: filestorage_v3.yml - ModelPermissionDeserializer: - properties: - is_enabled: optional - source: - openapi: filestorage_v3.yml - ModelPermissionDeserializerRequest: - properties: - is_enabled: optional - source: - openapi: filestorage_v3.yml - MultipartFormFieldRequestEncoding: - discriminated: false - docs: |- - The encoding of the value of `data`. Defaults to `RAW` if not defined. - - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - union: - - EncodingEnum - - string - source: - openapi: filestorage_v3.yml - inline: true - MultipartFormFieldRequest: - docs: >- - # The MultipartFormField Object - - ### Description - - The `MultipartFormField` object is used to represent fields in an HTTP - request using `multipart/form-data`. - - - ### Usage Example - - Create a `MultipartFormField` to define a multipart form entry. - properties: - name: - type: string - docs: The name of the form field - validation: - minLength: 1 - data: - type: string - docs: The data for the form field. - validation: - minLength: 1 - encoding: - type: optional - docs: |- - The encoding of the value of `data`. Defaults to `RAW` if not defined. - - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - file_name: - type: optional - docs: The file name of the form field, if the field is for a file. - validation: - minLength: 1 - content_type: - type: optional - docs: The MIME type of the file, if the field is for a file. - validation: - minLength: 1 - source: - openapi: filestorage_v3.yml - PaginatedAccountDetailsAndActionsList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: filestorage_v3.yml - PaginatedAuditLogEventList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: filestorage_v3.yml - PaginatedDownloadRequestMetaList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: filestorage_v3.yml - PaginatedDriveList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: filestorage_v3.yml - PaginatedFileList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: filestorage_v3.yml - PaginatedFolderList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: filestorage_v3.yml - PaginatedGroupList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: filestorage_v3.yml - PaginatedIssueList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: filestorage_v3.yml - PaginatedSyncStatusList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: filestorage_v3.yml - PaginatedUserList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: filestorage_v3.yml - PermissionUser: - discriminated: false - docs: >- - The user that is granted this permission. This will only be populated if - the type is `USER`. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: filestorage_v3.yml - inline: true - PermissionGroup: - discriminated: false - docs: >- - The group that is granted this permission. This will only be populated if - the type is `GROUP`. - union: - - type: string - validation: - format: uuid - - Group - source: - openapi: filestorage_v3.yml - inline: true - PermissionType: - discriminated: false - docs: |- - Denotes what type of people have access to the file. - - * `USER` - USER - * `GROUP` - GROUP - * `COMPANY` - COMPANY - * `ANYONE` - ANYONE - union: - - TypeEnum - - string - source: - openapi: filestorage_v3.yml - inline: true - PermissionRolesItem: - discriminated: false - docs: |- - The permissions that the user or group has for the File or Folder. - - * `READ` - READ - * `WRITE` - WRITE - * `OWNER` - OWNER - union: - - RolesEnum - - string - source: - openapi: filestorage_v3.yml - inline: true - Permission: - docs: >- - # The Permission Object - - ### Description - - The Permission object is used to represent a user's or group's access to a - File or Folder. Permissions are unexpanded by default. - - - ### Usage Example - - Fetch from the `GET Files` or `GET Folders` endpoint. Permissions are - unexpanded by default. Use the query param `expand=permissions` to see - more details. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - user: - type: optional - docs: >- - The user that is granted this permission. This will only be populated - if the type is `USER`. - group: - type: optional - docs: >- - The group that is granted this permission. This will only be populated - if the type is `GROUP`. - type: - type: optional - docs: |- - Denotes what type of people have access to the file. - - * `USER` - USER - * `GROUP` - GROUP - * `COMPANY` - COMPANY - * `ANYONE` - ANYONE - roles: - type: optional>> - docs: >- - The permissions that the user or group has for the File or Folder. It - is possible for a user or group to have multiple roles, such as - viewing & uploading. Possible values include: `READ`, `WRITE`, - `OWNER`. In cases where there is no clear mapping, the original value - passed through will be returned. - source: - openapi: filestorage_v3.yml - PermissionRequestUser: - discriminated: false - docs: >- - The user that is granted this permission. This will only be populated if - the type is `USER`. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: filestorage_v3.yml - inline: true - PermissionRequestGroup: - discriminated: false - docs: >- - The group that is granted this permission. This will only be populated if - the type is `GROUP`. - union: - - type: string - validation: - format: uuid - - Group - source: - openapi: filestorage_v3.yml - inline: true - PermissionRequestType: - discriminated: false - docs: |- - Denotes what type of people have access to the file. - - * `USER` - USER - * `GROUP` - GROUP - * `COMPANY` - COMPANY - * `ANYONE` - ANYONE - union: - - TypeEnum - - string - source: - openapi: filestorage_v3.yml - inline: true - PermissionRequestRolesItem: - discriminated: false - docs: |- - The permissions that the user or group has for the File or Folder. - - * `READ` - READ - * `WRITE` - WRITE - * `OWNER` - OWNER - union: - - RolesEnum - - string - source: - openapi: filestorage_v3.yml - inline: true - PermissionRequest: - docs: >- - # The Permission Object - - ### Description - - The Permission object is used to represent a user's or group's access to a - File or Folder. Permissions are unexpanded by default. - - - ### Usage Example - - Fetch from the `GET Files` or `GET Folders` endpoint. Permissions are - unexpanded by default. Use the query param `expand=permissions` to see - more details. - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - user: - type: optional - docs: >- - The user that is granted this permission. This will only be populated - if the type is `USER`. - group: - type: optional - docs: >- - The group that is granted this permission. This will only be populated - if the type is `GROUP`. - type: - type: optional - docs: |- - Denotes what type of people have access to the file. - - * `USER` - USER - * `GROUP` - GROUP - * `COMPANY` - COMPANY - * `ANYONE` - ANYONE - roles: - type: optional>> - docs: >- - The permissions that the user or group has for the File or Folder. It - is possible for a user or group to have multiple roles, such as - viewing & uploading. Possible values include: `READ`, `WRITE`, - `OWNER`. In cases where there is no clear mapping, the original value - passed through will be returned. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: filestorage_v3.yml - RemoteData: - docs: >- - # The RemoteData Object - - ### Description - - The `RemoteData` object is used to represent the full data pulled from the - third-party API for an object. - - - ### Usage Example - - TODO - properties: - path: - type: string - docs: The third-party API path that is being called. - data: - type: optional - access: read-only - source: - openapi: filestorage_v3.yml - RemoteEndpointInfo: - properties: - method: string - url_path: string - field_traversal_path: list - source: - openapi: filestorage_v3.yml - RemoteFieldApiCoverage: - discriminated: false - union: - - integer - - double - source: - openapi: filestorage_v3.yml - inline: true - RemoteFieldApi: - properties: - schema: map - remote_key_name: string - remote_endpoint_info: RemoteEndpointInfo - example_values: optional> - advanced_metadata: optional - coverage: - type: optional - access: read-only - source: - openapi: filestorage_v3.yml - RemoteFieldApiResponse: - properties: - File: optional> - Folder: optional> - Drive: optional> - Group: optional> - User: optional> - source: - openapi: filestorage_v3.yml - RemoteKey: - docs: >- - # The RemoteKey Object - - ### Description - - The `RemoteKey` object is used to represent a request for a new remote - key. - - - ### Usage Example - - Post a `GenerateRemoteKey` to receive a new `RemoteKey`. - properties: - name: string - key: string - source: - openapi: filestorage_v3.yml - RemoteResponseResponseType: - discriminated: false - union: - - ResponseTypeEnum - - string - source: - openapi: filestorage_v3.yml - inline: true - RemoteResponse: - docs: >- - # The RemoteResponse Object - - ### Description - - The `RemoteResponse` object is used to represent information returned from - a third-party endpoint. - - - ### Usage Example - - View the `RemoteResponse` returned from your `DataPassthrough`. - properties: - method: string - path: string - status: integer - response: unknown - response_headers: optional> - response_type: optional - headers: optional> - source: - openapi: filestorage_v3.yml - RequestFormatEnum: - enum: - - JSON - - XML - - MULTIPART - docs: |- - * `JSON` - JSON - * `XML` - XML - * `MULTIPART` - MULTIPART - source: - openapi: filestorage_v3.yml - ResponseTypeEnum: - enum: - - JSON - - BASE64_GZIP - docs: |- - * `JSON` - JSON - * `BASE64_GZIP` - BASE64_GZIP - source: - openapi: filestorage_v3.yml - RoleEnum: - enum: - - ADMIN - - DEVELOPER - - MEMBER - - API - - SYSTEM - - MERGE_TEAM - docs: |- - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - source: - openapi: filestorage_v3.yml - RolesEnum: - enum: - - READ - - WRITE - - OWNER - docs: |- - * `READ` - READ - * `WRITE` - WRITE - * `OWNER` - OWNER - source: - openapi: filestorage_v3.yml - SelectiveSyncConfigurationsUsageEnum: - enum: - - IN_NEXT_SYNC - - IN_LAST_SYNC - docs: |- - * `IN_NEXT_SYNC` - IN_NEXT_SYNC - * `IN_LAST_SYNC` - IN_LAST_SYNC - source: - openapi: filestorage_v3.yml - StatusFd5Enum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - docs: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - source: - openapi: filestorage_v3.yml - SyncStatusLastSyncResult: - discriminated: false - union: - - LastSyncResultEnum - - string - source: - openapi: filestorage_v3.yml - inline: true - SyncStatusStatus: - discriminated: false - union: - - StatusFd5Enum - - string - source: - openapi: filestorage_v3.yml - inline: true - SyncStatus: - docs: >- - # The SyncStatus Object - - ### Description - - The `SyncStatus` object is used to represent the syncing state of an - account - - - ### Usage Example - - View the `SyncStatus` for an account to see how recently its models were - synced. - properties: - model_name: string - model_id: string - last_sync_start: optional - next_sync_start: optional - last_sync_result: optional - last_sync_finished: optional - status: SyncStatusStatus - is_initial_sync: boolean - selective_sync_configurations_usage: optional - source: - openapi: filestorage_v3.yml - TypeEnum: - enum: - - USER - - GROUP - - COMPANY - - ANYONE - docs: |- - * `USER` - USER - * `GROUP` - GROUP - * `COMPANY` - COMPANY - * `ANYONE` - ANYONE - source: - openapi: filestorage_v3.yml - User: - docs: >- - # The User Object - - ### Description - - The `User` object is used to represent a user within the File Storage - account. - - ### Usage Example - - Fetch from the `GET /api/filestorage/v1/users` endpoint and view their - users. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The user's name. - validation: - maxLength: 254 - email_address: - type: optional - docs: >- - The user's email address. This is typically used to identify a user - across linked accounts. - validation: - maxLength: 2000 - is_me: - type: optional - docs: Whether the user is the one who linked this account. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: filestorage_v3.yml - ValidationProblemSource: - properties: - pointer: string - source: - openapi: filestorage_v3.yml - WarningValidationProblem: - properties: - source: optional - title: string - detail: string - problem_type: string - source: - openapi: filestorage_v3.yml - WebhookReceiver: - properties: - event: string - is_active: boolean - key: optional - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/accountDetails.yml b/.mock/definition/FileStorage/accountDetails.yml deleted file mode 100644 index e6b0a3877..000000000 --- a/.mock/definition/FileStorage/accountDetails.yml +++ /dev/null @@ -1,38 +0,0 @@ -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /filestorage/v1/account-details - method: GET - auth: - - tokenAuth: [] - docs: Get details for a linked account. - source: - openapi: filestorage_v3.yml - response: - docs: '' - type: fileStorageRoot.AccountDetails - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - integration: BambooHR - integration_slug: bamboohr - category: hris - end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - end_user_organization_name: Waystar Royco - end_user_email_address: kendall.roy@waystar-royco.com - status: COMPLETE - webhook_listener_url: >- - https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: true - account_type: PRODUCTION - completed_at: '2024-08-26T20:11:19Z' - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/accountToken.yml b/.mock/definition/FileStorage/accountToken.yml deleted file mode 100644 index 5027e47ca..000000000 --- a/.mock/definition/FileStorage/accountToken.yml +++ /dev/null @@ -1,47 +0,0 @@ -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /filestorage/v1/account-token/{public_token} - method: GET - auth: - - tokenAuth: [] - docs: >- - Returns the account token for the end user with the provided public - token. - source: - openapi: filestorage_v3.yml - path-parameters: - public_token: string - response: - docs: '' - type: fileStorageRoot.AccountToken - status-code: 200 - examples: - - path-parameters: - public_token: public_token - headers: - X-Account-Token: '[object Object]' - response: - body: - account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB - integration: - name: name - abbreviated_name: abbreviated_name - categories: - - hris - image: image - square_image: square_image - color: color - slug: slug - api_endpoints_to_documentation_urls: - key: value - webhook_setup_guide_url: webhook_setup_guide_url - category_beta_status: - key: value - id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/asyncPassthrough.yml b/.mock/definition/FileStorage/asyncPassthrough.yml deleted file mode 100644 index 917001aab..000000000 --- a/.mock/definition/FileStorage/asyncPassthrough.yml +++ /dev/null @@ -1,74 +0,0 @@ -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /filestorage/v1/async-passthrough - method: POST - auth: - - tokenAuth: [] - docs: >- - Asynchronously pull data from an endpoint not currently supported by - Merge. - source: - openapi: filestorage_v3.yml - request: - body: fileStorageRoot.DataPassthroughRequest - content-type: application/json - response: - docs: '' - type: fileStorageRoot.AsyncPassthroughReciept - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - method: GET - path: /scooters - response: - body: - async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd - retrieve: - path: /filestorage/v1/async-passthrough/{async_passthrough_receipt_id} - method: GET - auth: - - tokenAuth: [] - docs: Retrieves data from earlier async-passthrough POST request - source: - openapi: filestorage_v3.yml - path-parameters: - async_passthrough_receipt_id: string - response: - docs: '' - type: AsyncPassthroughRetrieveResponse - status-code: 200 - examples: - - path-parameters: - async_passthrough_receipt_id: async_passthrough_receipt_id - headers: - X-Account-Token: X-Account-Token - response: - body: - method: GET - path: /scooters - status: 200 - response: - key: value - response_headers: - X-Page-Token: value - response_type: JSON - headers: - EXTRA-HEADER: value - Authorization: - source: - openapi: filestorage_v3.yml -types: - AsyncPassthroughRetrieveResponse: - discriminated: false - union: - - fileStorageRoot.RemoteResponse - - string - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/auditTrail.yml b/.mock/definition/FileStorage/auditTrail.yml deleted file mode 100644 index 5147ae3f0..000000000 --- a/.mock/definition/FileStorage/auditTrail.yml +++ /dev/null @@ -1,108 +0,0 @@ -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /filestorage/v1/audit-trail - method: GET - auth: - - tokenAuth: [] - docs: Gets a list of audit trail events. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: filestorage_v3.yml - request: - name: AuditTrailListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - end_date: - type: optional - docs: >- - If included, will only include audit trail events that occurred - before this time - event_type: - type: optional - docs: >- - If included, will only include events with the given event type. - Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, - `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, - `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, - `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, - `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, - `DELETED_LINKED_ACCOUNT`, - `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, - `CREATED_DESTINATION`, `DELETED_DESTINATION`, - `CHANGED_DESTINATION`, `CHANGED_SCOPES`, - `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, - `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, - `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, - `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, - `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, - `END_USER_CREDENTIALS_ACCESSED` - page_size: - type: optional - docs: Number of results to return per page. - start_date: - type: optional - docs: >- - If included, will only include audit trail events that occurred - after this time - user_email: - type: optional - docs: >- - If provided, this will return events associated with the specified - user email. Please note that the email address reflects the user's - email at the time of the event, and may not be their current - email. - response: - docs: '' - type: fileStorageRoot.PaginatedAuditLogEventList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_date: end_date - event_type: event_type - page_size: 1 - start_date: start_date - user_email: user_email - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: b5ceea2a-7171-47ce-8090-165cfce5572c - user_name: Gil Feig - user_email: hello@merge.dev - role: ADMIN - ip_address: 192.0.2.123 - event_type: CREATED_REMOTE_PRODUCTION_API_KEY - event_description: >- - Organization-wide Scopes for model hris.Employee updated - from Read to Read+Write - created_at: '2024-01-15T09:30:00Z' - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/availableActions.yml b/.mock/definition/FileStorage/availableActions.yml deleted file mode 100644 index a9ab1fadd..000000000 --- a/.mock/definition/FileStorage/availableActions.yml +++ /dev/null @@ -1,52 +0,0 @@ -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /filestorage/v1/available-actions - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of models and actions available for an account. - source: - openapi: filestorage_v3.yml - response: - docs: '' - type: fileStorageRoot.AvailableActions - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - integration: - name: name - abbreviated_name: abbreviated_name - categories: - - hris - image: image - square_image: square_image - color: color - slug: slug - api_endpoints_to_documentation_urls: - key: value - webhook_setup_guide_url: webhook_setup_guide_url - category_beta_status: - key: value - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/deleteAccount.yml b/.mock/definition/FileStorage/deleteAccount.yml deleted file mode 100644 index 767689fd2..000000000 --- a/.mock/definition/FileStorage/deleteAccount.yml +++ /dev/null @@ -1,17 +0,0 @@ -service: - auth: false - base-path: '' - endpoints: - delete: - path: /filestorage/v1/delete-account - method: POST - auth: - - tokenAuth: [] - docs: Delete a linked account. - source: - openapi: filestorage_v3.yml - examples: - - headers: - X-Account-Token: X-Account-Token - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/drives.yml b/.mock/definition/FileStorage/drives.yml deleted file mode 100644 index d02d4f3dd..000000000 --- a/.mock/definition/FileStorage/drives.yml +++ /dev/null @@ -1,168 +0,0 @@ -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /filestorage/v1/drives - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Drive` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: filestorage_v3.yml - request: - name: DrivesListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - name: - type: optional - docs: >- - If provided, will only return drives with this name. This performs - an exact match. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: fileStorageRoot.PaginatedDriveList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - name: name - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: f9e3d315-d6c2-458e-85c4-fa773d6ff4a6 - remote_id: '2039348' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: My Drive - remote_created_at: '2024-01-15T09:30:00Z' - drive_url: https://drive.com/drives/2039349 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /drives - data: - - Varies by platform - retrieve: - path: /filestorage/v1/drives/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Drive` object with the given `id`. - source: - openapi: filestorage_v3.yml - path-parameters: - id: string - request: - name: DrivesRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: fileStorageRoot.Drive - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: f9e3d315-d6c2-458e-85c4-fa773d6ff4a6 - remote_id: '2039348' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: My Drive - remote_created_at: '2024-01-15T09:30:00Z' - drive_url: https://drive.com/drives/2039349 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /drives - data: - - Varies by platform - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/fieldMapping.yml b/.mock/definition/FileStorage/fieldMapping.yml deleted file mode 100644 index 34013d3a4..000000000 --- a/.mock/definition/FileStorage/fieldMapping.yml +++ /dev/null @@ -1,537 +0,0 @@ -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - field_mappings_retrieve: - path: /filestorage/v1/field-mappings - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all Field Mappings for this Linked Account. Field Mappings are - mappings between third-party Remote Fields and user defined Merge - fields. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - source: - openapi: filestorage_v3.yml - request: - name: FieldMappingsRetrieveRequest - query-parameters: - exclude_remote_field_metadata: - type: optional - docs: >- - If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and - `remote_fields.schema` will be null). This will increase the speed - of the request since these fields require some calculations. - response: - docs: '' - type: fileStorageRoot.FieldMappingApiInstanceResponse - status-code: 200 - examples: - - query-parameters: - exclude_remote_field_metadata: true - headers: - X-Account-Token: X-Account-Token - response: - body: - File: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Folder: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Drive: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Group: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - User: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - field_mappings_create: - path: /filestorage/v1/field-mappings - method: POST - auth: - - tokenAuth: [] - docs: >- - Create new Field Mappings that will be available after the next - scheduled sync. This will cause the next sync for this Linked Account to - sync **ALL** data from start. - source: - openapi: filestorage_v3.yml - request: - name: CreateFieldMappingRequest - query-parameters: - exclude_remote_field_metadata: - type: optional - docs: >- - If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and - `remote_fields.schema` will be null). This will increase the speed - of the request since these fields require some calculations. - body: - properties: - target_field_name: - type: string - docs: >- - The name of the target field you want this remote field to map - to. - validation: - minLength: 1 - target_field_description: - type: string - docs: >- - The description of the target field you want this remote field - to map to. - validation: - minLength: 1 - remote_field_traversal_path: - docs: >- - The field traversal path of the remote field listed when you hit - the GET /remote-fields endpoint. - type: list - remote_method: - type: string - docs: >- - The method of the remote endpoint where the remote field is - coming from. - validation: - minLength: 1 - remote_url_path: - type: string - docs: >- - The path of the remote endpoint where the remote field is coming - from. - validation: - minLength: 1 - common_model_name: - type: string - docs: >- - The name of the Common Model that the remote field corresponds - to in a given category. - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: fileStorageRoot.FieldMappingInstanceResponse - status-code: 201 - examples: - - query-parameters: - exclude_remote_field_metadata: true - headers: - X-Account-Token: X-Account-Token - request: - target_field_name: example_target_field_name - target_field_description: this is a example description of the target field - remote_field_traversal_path: - - example_remote_field - remote_method: GET - remote_url_path: /example-url-path - common_model_name: ExampleCommonModel - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - field_mappings_destroy: - path: /filestorage/v1/field-mappings/{field_mapping_id} - method: DELETE - auth: - - tokenAuth: [] - docs: >- - Deletes Field Mappings for a Linked Account. All data related to this - Field Mapping will be deleted and these changes will be reflected after - the next scheduled sync. This will cause the next sync for this Linked - Account to sync **ALL** data from start. - source: - openapi: filestorage_v3.yml - path-parameters: - field_mapping_id: string - response: - docs: '' - type: fileStorageRoot.FieldMappingInstanceResponse - status-code: 204 - examples: - - path-parameters: - field_mapping_id: field_mapping_id - headers: - X-Account-Token: X-Account-Token - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - field_mappings_partial_update: - path: /filestorage/v1/field-mappings/{field_mapping_id} - method: PATCH - auth: - - tokenAuth: [] - docs: >- - Create or update existing Field Mappings for a Linked Account. Changes - will be reflected after the next scheduled sync. This will cause the - next sync for this Linked Account to sync **ALL** data from start. - source: - openapi: filestorage_v3.yml - path-parameters: - field_mapping_id: string - request: - name: PatchedEditFieldMappingRequest - body: - properties: - remote_field_traversal_path: - type: optional> - docs: >- - The field traversal path of the remote field listed when you hit - the GET /remote-fields endpoint. - remote_method: - type: optional - docs: >- - The method of the remote endpoint where the remote field is - coming from. - validation: - minLength: 1 - remote_url_path: - type: optional - docs: >- - The path of the remote endpoint where the remote field is coming - from. - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: fileStorageRoot.FieldMappingInstanceResponse - status-code: 200 - examples: - - path-parameters: - field_mapping_id: field_mapping_id - headers: - X-Account-Token: X-Account-Token - request: {} - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - remote_fields_retrieve: - path: /filestorage/v1/remote-fields - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all remote fields for a Linked Account. Remote fields are - third-party fields that are accessible after initial sync if remote_data - is enabled. You can use remote fields to override existing Merge fields - or map a new Merge field. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - source: - openapi: filestorage_v3.yml - request: - name: RemoteFieldsRetrieveRequest - query-parameters: - common_models: - type: optional - docs: >- - A comma seperated list of Common Model names. If included, will - only return Remote Fields for those Common Models. - include_example_values: - type: optional - docs: >- - If true, will include example values, where available, for remote - fields in the 3rd party platform. These examples come from active - data from your customers. - response: - docs: '' - type: fileStorageRoot.RemoteFieldApiResponse - status-code: 200 - examples: - - query-parameters: - common_models: common_models - include_example_values: include_example_values - headers: - X-Account-Token: X-Account-Token - response: - body: - File: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Folder: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Drive: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Group: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - User: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - target_fields_retrieve: - path: /filestorage/v1/target-fields - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all organization-wide Target Fields, this will not include any - Linked Account specific Target Fields. Organization-wide Target Fields - are additional fields appended to the Merge Common Model for all Linked - Accounts in a category. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). - source: - openapi: filestorage_v3.yml - response: - docs: '' - type: fileStorageRoot.ExternalTargetFieldApiResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - File: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Folder: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Drive: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Group: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - User: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/files.yml b/.mock/definition/FileStorage/files.yml deleted file mode 100644 index ea98b7d93..000000000 --- a/.mock/definition/FileStorage/files.yml +++ /dev/null @@ -1,713 +0,0 @@ -types: - FilesListRequestExpandItem: - enum: - - drive - - folder - - permissions - source: - openapi: filestorage_v3.yml - FilesListRequestOrderBy: - enum: - - value: '-created_at' - name: CreatedAtDescending - - value: '-modified_at' - name: ModifiedAtDescending - - value: created_at - name: CreatedAtAscending - - value: modified_at - name: ModifiedAtAscending - source: - openapi: filestorage_v3.yml - FilesRetrieveRequestExpandItem: - enum: - - drive - - folder - - permissions - source: - openapi: filestorage_v3.yml - FilesDownloadRequestMetaListRequestOrderBy: - enum: - - value: '-created_at' - name: CreatedAtDescending - - value: '-modified_at' - name: ModifiedAtDescending - - value: created_at - name: CreatedAtAscending - - value: modified_at - name: ModifiedAtAscending - source: - openapi: filestorage_v3.yml -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /filestorage/v1/files - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `File` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: filestorage_v3.yml - request: - name: FilesListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - drive_id: - type: optional - docs: >- - Specifying a drive id returns only the files in that drive. - Specifying null returns only the files outside the top-level - drive. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - folder_id: - type: optional - docs: >- - Specifying a folder id returns only the files in that folder. - Specifying null returns only the files in root directory. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - mime_type: - type: optional - docs: >- - If provided, will only return files with these mime_types. - Multiple values can be separated by commas. - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - name: - type: optional - docs: >- - If provided, will only return files with this name. This performs - an exact match. - order_by: - type: optional - docs: >- - Overrides the default ordering for this endpoint. Possible values - include: created_at, -created_at, modified_at, -modified_at. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: fileStorageRoot.PaginatedFileList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - drive_id: drive_id - folder_id: folder_id - include_deleted_data: true - include_remote_data: true - include_shell_data: true - mime_type: mime_type - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - name: name - order_by: '-created_at' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 45ce474c-dhcj-43a6-754r-629f799f7d68 - remote_id: '12' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: merge_file_storage_launch.docx - file_url: https://drive.com/1234 - file_thumbnail_url: https://drive.com/1234/thumbnail.png - size: 254 - mime_type: >- - application/vnd.openxmlformats-officedocument.wordprocessingml.document - description: >- - Use common model scopes to redact data returned in Merge's - Common Models! - folder: folder - checksum: - type: sha256 - content_hash: >- - e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - permissions: permissions - drive: drive - remote_created_at: '2022-02-02T00:00:00Z' - remote_updated_at: '2022-02-03T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /files - data: - - Varies by platform - create: - path: /filestorage/v1/files - method: POST - auth: - - tokenAuth: [] - docs: Creates a `File` object with the given values. - source: - openapi: filestorage_v3.yml - request: - name: FileStorageFileEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: fileStorageRoot.FileRequest - content-type: application/json - response: - docs: '' - type: fileStorageRoot.FileStorageFileResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 45ce474c-dhcj-43a6-754r-629f799f7d68 - remote_id: '12' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: merge_file_storage_launch.docx - file_url: https://drive.com/1234 - file_thumbnail_url: https://drive.com/1234/thumbnail.png - size: 254 - mime_type: >- - application/vnd.openxmlformats-officedocument.wordprocessingml.document - description: >- - Use common model scopes to redact data returned in Merge's - Common Models! - folder: folder - checksum: - type: sha256 - content_hash: >- - e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - permissions: permissions - drive: drive - remote_created_at: '2022-02-02T00:00:00Z' - remote_updated_at: '2022-02-03T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /files - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /filestorage/v1/files/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `File` object with the given `id`. - source: - openapi: filestorage_v3.yml - path-parameters: - id: string - request: - name: FilesRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: fileStorageRoot.File - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 45ce474c-dhcj-43a6-754r-629f799f7d68 - remote_id: '12' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: merge_file_storage_launch.docx - file_url: https://drive.com/1234 - file_thumbnail_url: https://drive.com/1234/thumbnail.png - size: 254 - mime_type: >- - application/vnd.openxmlformats-officedocument.wordprocessingml.document - description: >- - Use common model scopes to redact data returned in Merge's - Common Models! - folder: folder - checksum: - type: sha256 - content_hash: >- - e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - permissions: permissions - drive: drive - remote_created_at: '2022-02-02T00:00:00Z' - remote_updated_at: '2022-02-03T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /files - data: - - Varies by platform - downloadRetrieve: - path: /filestorage/v1/files/{id}/download - method: GET - auth: - - tokenAuth: [] - docs: Returns the `File` content with the given `id` as a stream of bytes. - source: - openapi: filestorage_v3.yml - path-parameters: - id: string - request: - name: FilesDownloadRetrieveRequest - query-parameters: - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - mime_type: - type: optional - docs: >- - If provided, specifies the export format of the file to be - downloaded. For information on supported export formats, please - refer to our export format help center article. - response: - docs: '' - type: file - status-code: 200 - downloadRequestMetaRetrieve: - path: /filestorage/v1/files/{id}/download/request-meta - method: GET - auth: - - tokenAuth: [] - docs: >- - Returns metadata to construct an authenticated file download request for - a singular file, allowing you to download file directly from the - third-party. - source: - openapi: filestorage_v3.yml - path-parameters: - id: string - request: - name: FilesDownloadRequestMetaRetrieveRequest - query-parameters: - mime_type: - type: optional - docs: >- - If provided, specifies the export format of the file to be - downloaded. For information on supported export formats, please - refer to our export format help center article. - response: - docs: '' - type: fileStorageRoot.DownloadRequestMeta - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - mime_type: mime_type - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - url: https://www.googleapis.com/drive/v3/files/234?alt=media - method: GET - headers: - Authorization: Bearer 1234 - downloadRequestMetaList: - path: /filestorage/v1/files/download/request-meta - method: GET - auth: - - tokenAuth: [] - docs: >- - Returns metadata to construct authenticated file download requests, - allowing you to download files directly from the third-party. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: filestorage_v3.yml - request: - name: FilesDownloadRequestMetaListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - mime_types: - type: optional - docs: >- - A comma-separated list of preferred MIME types in order of - priority. If supported by the third-party provider, the file(s) - will be returned in the first supported MIME type from the list. - The default MIME type is PDF. To see supported MIME types by file - type, refer to our export format help center article. - modified_after: - type: optional - docs: >- - If provided, will only return objects modified after this - datetime. - modified_before: - type: optional - docs: >- - If provided, will only return objects modified before this - datetime. - order_by: - type: optional - docs: >- - Overrides the default ordering for this endpoint. Possible values - include: created_at, -created_at, modified_at, -modified_at. - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: fileStorageRoot.PaginatedDownloadRequestMetaList - status-code: 200 - examples: - - query-parameters: - created_after: created_after - created_before: created_before - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - mime_types: mime_types - modified_after: modified_after - modified_before: modified_before - order_by: '-created_at' - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - url: https://www.googleapis.com/drive/v3/files/234?alt=media - method: GET - headers: - Authorization: Bearer 1234 - metaPostRetrieve: - path: /filestorage/v1/files/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `FileStorageFile` POSTs. - source: - openapi: filestorage_v3.yml - response: - docs: '' - type: fileStorageRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/folders.yml b/.mock/definition/FileStorage/folders.yml deleted file mode 100644 index c95cff0a6..000000000 --- a/.mock/definition/FileStorage/folders.yml +++ /dev/null @@ -1,484 +0,0 @@ -types: - FoldersListRequestExpandItem: - enum: - - drive - - parent_folder - - permissions - source: - openapi: filestorage_v3.yml - FoldersRetrieveRequestExpandItem: - enum: - - drive - - parent_folder - - permissions - source: - openapi: filestorage_v3.yml -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /filestorage/v1/folders - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Folder` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: filestorage_v3.yml - request: - name: FoldersListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - drive_id: - type: optional - docs: If provided, will only return folders in this drive. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - name: - type: optional - docs: >- - If provided, will only return folders with this name. This - performs an exact match. - page_size: - type: optional - docs: Number of results to return per page. - parent_folder_id: - type: optional - docs: >- - If provided, will only return folders in this parent folder. If - null, will return folders in root directory. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: fileStorageRoot.PaginatedFolderList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - drive_id: drive_id - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - name: name - page_size: 1 - parent_folder_id: parent_folder_id - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: e021f7a7-74fc-4487-8e12-14180c92d3b7 - remote_id: '14' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: R&D - folder_url: https://drive.com/1234 - size: 2738000 - description: All things R&D related at Merge! - parent_folder: parent_folder - drive: drive - permissions: permissions - remote_created_at: '2024-02-02T00:00:00Z' - remote_updated_at: '2024-06-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /folders - data: - - Varies by platform - create: - path: /filestorage/v1/folders - method: POST - auth: - - tokenAuth: [] - docs: Creates a `Folder` object with the given values. - source: - openapi: filestorage_v3.yml - request: - name: FileStorageFolderEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: fileStorageRoot.FolderRequest - content-type: application/json - response: - docs: '' - type: fileStorageRoot.FileStorageFolderResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: e021f7a7-74fc-4487-8e12-14180c92d3b7 - remote_id: '14' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: R&D - folder_url: https://drive.com/1234 - size: 2738000 - description: All things R&D related at Merge! - parent_folder: parent_folder - drive: drive - permissions: permissions - remote_created_at: '2024-02-02T00:00:00Z' - remote_updated_at: '2024-06-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /folders - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /filestorage/v1/folders/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Folder` object with the given `id`. - source: - openapi: filestorage_v3.yml - path-parameters: - id: string - request: - name: FoldersRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: fileStorageRoot.Folder - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: e021f7a7-74fc-4487-8e12-14180c92d3b7 - remote_id: '14' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: R&D - folder_url: https://drive.com/1234 - size: 2738000 - description: All things R&D related at Merge! - parent_folder: parent_folder - drive: drive - permissions: permissions - remote_created_at: '2024-02-02T00:00:00Z' - remote_updated_at: '2024-06-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /folders - data: - - Varies by platform - metaPostRetrieve: - path: /filestorage/v1/folders/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `FileStorageFolder` POSTs. - source: - openapi: filestorage_v3.yml - response: - docs: '' - type: fileStorageRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/forceResync.yml b/.mock/definition/FileStorage/forceResync.yml deleted file mode 100644 index d280ccdf1..000000000 --- a/.mock/definition/FileStorage/forceResync.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - sync_status_resync_create: - path: /filestorage/v1/sync-status/resync - method: POST - auth: - - tokenAuth: [] - docs: >- - Force re-sync of all models. This endpoint is available for monthly, - quarterly, and highest sync frequency customers on the Professional or - Enterprise plans. Doing so will consume a sync credit for the relevant - linked account. Force re-syncs can also be triggered manually in the - Merge Dashboard and is available for all customers. - source: - openapi: filestorage_v3.yml - response: - docs: '' - type: list - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - - model_name: File - model_id: filestorage.FileStorageFile - last_sync_start: '2021-03-30T19:44:18Z' - next_sync_start: '2021-03-30T20:44:18Z' - last_sync_result: SYNCING - last_sync_finished: '2021-03-30T19:55:18Z' - status: SYNCING - is_initial_sync: true - selective_sync_configurations_usage: IN_NEXT_SYNC - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/generateKey.yml b/.mock/definition/FileStorage/generateKey.yml deleted file mode 100644 index 4cc23f5ac..000000000 --- a/.mock/definition/FileStorage/generateKey.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /filestorage/v1/generate-key - method: POST - auth: - - tokenAuth: [] - docs: Create a remote key. - source: - openapi: filestorage_v3.yml - request: - name: GenerateRemoteKeyRequest - body: - properties: - name: - type: string - docs: The name of the remote key - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: fileStorageRoot.RemoteKey - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - name: Remote Deployment Key 1 - response: - body: - name: Remote Deployment Key 1 - key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/groups.yml b/.mock/definition/FileStorage/groups.yml deleted file mode 100644 index c7b80bf92..000000000 --- a/.mock/definition/FileStorage/groups.yml +++ /dev/null @@ -1,191 +0,0 @@ -types: - GroupsListRequestExpandItem: - enum: - - child_groups - - users - source: - openapi: filestorage_v3.yml - GroupsRetrieveRequestExpandItem: - enum: - - child_groups - - users - source: - openapi: filestorage_v3.yml -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /filestorage/v1/groups - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Group` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: filestorage_v3.yml - request: - name: GroupsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: fileStorageRoot.PaginatedGroupList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 5624aceb-0ea2-4864-ba08-354ac56b9884 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Administrators - users: - - 6e93361b-8ae7-444b-bfa2-71206cbbee24 - child_groups: - - a1f90b3c-633d-404e-a696-05cd54808676 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /groups - data: - - Varies by platform - retrieve: - path: /filestorage/v1/groups/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Group` object with the given `id`. - source: - openapi: filestorage_v3.yml - path-parameters: - id: string - request: - name: GroupsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: fileStorageRoot.Group - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 5624aceb-0ea2-4864-ba08-354ac56b9884 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Administrators - users: - - 6e93361b-8ae7-444b-bfa2-71206cbbee24 - child_groups: - - a1f90b3c-633d-404e-a696-05cd54808676 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /groups - data: - - Varies by platform - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/issues.yml b/.mock/definition/FileStorage/issues.yml deleted file mode 100644 index 90fd8d722..000000000 --- a/.mock/definition/FileStorage/issues.yml +++ /dev/null @@ -1,154 +0,0 @@ -types: - IssuesListRequestStatus: - enum: - - ONGOING - - RESOLVED - source: - openapi: filestorage_v3.yml -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /filestorage/v1/issues - method: GET - auth: - - tokenAuth: [] - docs: Gets all issues for Organization. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: filestorage_v3.yml - request: - name: IssuesListRequest - query-parameters: - account_token: optional - cursor: - type: optional - docs: The pagination cursor value. - end_date: - type: optional - docs: >- - If included, will only include issues whose most recent action - occurred before this time - end_user_organization_name: optional - first_incident_time_after: - type: optional - docs: >- - If provided, will only return issues whose first incident time was - after this datetime. - first_incident_time_before: - type: optional - docs: >- - If provided, will only return issues whose first incident time was - before this datetime. - include_muted: - type: optional - docs: If true, will include muted issues - integration_name: optional - last_incident_time_after: - type: optional - docs: >- - If provided, will only return issues whose last incident time was - after this datetime. - last_incident_time_before: - type: optional - docs: >- - If provided, will only return issues whose last incident time was - before this datetime. - linked_account_id: - type: optional - docs: >- - If provided, will only include issues pertaining to the linked - account passed in. - page_size: - type: optional - docs: Number of results to return per page. - start_date: - type: optional - docs: >- - If included, will only include issues whose most recent action - occurred after this time - status: - type: optional - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - response: - docs: '' - type: fileStorageRoot.PaginatedIssueList - status-code: 200 - examples: - - query-parameters: - account_token: account_token - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_date: end_date - end_user_organization_name: end_user_organization_name - first_incident_time_after: '2024-01-15T09:30:00Z' - first_incident_time_before: '2024-01-15T09:30:00Z' - include_muted: include_muted - integration_name: integration_name - last_incident_time_after: '2024-01-15T09:30:00Z' - last_incident_time_before: '2024-01-15T09:30:00Z' - linked_account_id: linked_account_id - page_size: 1 - start_date: start_date - status: ONGOING - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: ONGOING - error_description: Missing Permissions - end_user: - key: value - first_incident_time: '2022-12-05T16:19:15Z' - last_incident_time: '2022-12-05T16:19:15Z' - is_muted: true - error_details: - - Missing employee permissions. - - Missing time off permissions. - retrieve: - path: /filestorage/v1/issues/{id} - method: GET - auth: - - tokenAuth: [] - docs: Get a specific issue. - source: - openapi: filestorage_v3.yml - path-parameters: - id: string - response: - docs: '' - type: fileStorageRoot.Issue - status-code: 200 - examples: - - path-parameters: - id: id - headers: - X-Account-Token: '[object Object]' - response: - body: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: ONGOING - error_description: Missing Permissions - end_user: - key: value - first_incident_time: '2022-12-05T16:19:15Z' - last_incident_time: '2022-12-05T16:19:15Z' - is_muted: true - error_details: - - Missing employee permissions. - - Missing time off permissions. - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/linkToken.yml b/.mock/definition/FileStorage/linkToken.yml deleted file mode 100644 index fedfc8940..000000000 --- a/.mock/definition/FileStorage/linkToken.yml +++ /dev/null @@ -1,155 +0,0 @@ -imports: - fileStorageRoot: __package__.yml -types: - EndUserDetailsRequestLanguage: - discriminated: false - docs: >- - The following subset of IETF language tags can be used to configure - localization. - - - * `en` - en - - * `de` - de - union: - - fileStorageRoot.LanguageEnum - - string - source: - openapi: filestorage_v3.yml - inline: true -service: - auth: false - base-path: '' - endpoints: - create: - path: /filestorage/v1/link-token - method: POST - auth: - - tokenAuth: [] - docs: Creates a link token to be used when linking a new end user. - source: - openapi: filestorage_v3.yml - request: - name: EndUserDetailsRequest - body: - properties: - end_user_email_address: - type: string - docs: >- - Your end user's email address. This is purely for identification - purposes - setting this value will not cause any emails to be - sent. - validation: - minLength: 1 - maxLength: 100 - end_user_organization_name: - type: string - docs: Your end user's organization. - validation: - minLength: 1 - maxLength: 100 - end_user_origin_id: - type: string - docs: >- - This unique identifier typically represents the ID for your end - user in your product's database. This value must be distinct - from other Linked Accounts' unique identifiers. - validation: - minLength: 1 - maxLength: 100 - categories: - docs: The integration categories to show in Merge Link. - type: list - integration: - type: optional - docs: >- - The slug of a specific pre-selected integration for this linking - flow token. For examples of slugs, see - https://docs.merge.dev/guides/merge-link/single-integration/. - validation: - minLength: 1 - link_expiry_mins: - type: optional - docs: >- - An integer number of minutes between [30, 720 or 10080 if for a - Magic Link URL] for how long this token is valid. Defaults to - 30. - default: 30 - validation: - min: 30 - max: 10080 - should_create_magic_link_url: - type: optional - docs: >- - Whether to generate a Magic Link URL. Defaults to false. For - more information on Magic Link, see - https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - default: false - hide_admin_magic_link: - type: optional - docs: >- - Whether to generate a Magic Link URL on the Admin Needed screen - during the linking flow. Defaults to false. For more information - on Magic Link, see - https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - default: false - common_models: - type: optional> - docs: >- - An array of objects to specify the models and fields that will - be disabled for a given Linked Account. Each object uses - model_id, enabled_actions, and disabled_fields to specify the - model, method, and fields that are scoped for a given Linked - Account. - category_common_model_scopes: - type: >- - optional>>> - docs: >- - When creating a Link Token, you can set permissions for Common - Models that will apply to the account that is going to be - linked. Any model or field not specified in link token payload - will default to existing settings. - language: - type: optional - docs: >- - The following subset of IETF language tags can be used to - configure localization. - - - * `en` - en - - * `de` - de - are_syncs_disabled: - type: optional - docs: >- - The boolean that indicates whether initial, periodic, and force - syncs will be disabled. - default: false - integration_specific_config: - type: optional> - docs: >- - A JSON object containing integration-specific configuration - options. - content-type: application/json - response: - docs: '' - type: fileStorageRoot.LinkToken - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - end_user_email_address: example@gmail.com - end_user_organization_name: Test Organization - end_user_origin_id: '12345' - categories: - - hris - - ats - response: - body: - link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 - integration_name: Lever - magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/linkedAccounts.yml b/.mock/definition/FileStorage/linkedAccounts.yml deleted file mode 100644 index c74865ca0..000000000 --- a/.mock/definition/FileStorage/linkedAccounts.yml +++ /dev/null @@ -1,169 +0,0 @@ -types: - LinkedAccountsListRequestCategory: - enum: - - accounting - - ats - - crm - - filestorage - - hris - - mktg - - ticketing - source: - openapi: filestorage_v3.yml -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /filestorage/v1/linked-accounts - method: GET - auth: - - tokenAuth: [] - docs: List linked accounts for your organization. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: filestorage_v3.yml - request: - name: LinkedAccountsListRequest - query-parameters: - category: - type: optional - docs: >- - Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, - `mktg`, `ticketing` - - - * `hris` - hris - - * `ats` - ats - - * `accounting` - accounting - - * `ticketing` - ticketing - - * `crm` - crm - - * `mktg` - mktg - - * `filestorage` - filestorage - cursor: - type: optional - docs: The pagination cursor value. - end_user_email_address: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given email address. - end_user_organization_name: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given organization name. - end_user_origin_id: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given origin ID. - end_user_origin_ids: - type: optional - docs: >- - Comma-separated list of EndUser origin IDs, making it possible to - specify multiple EndUsers at once. - id: - type: optional - validation: - format: uuid - ids: - type: optional - docs: >- - Comma-separated list of LinkedAccount IDs, making it possible to - specify multiple LinkedAccounts at once. - include_duplicates: - type: optional - docs: >- - If `true`, will include complete production duplicates of the - account specified by the `id` query parameter in the response. - `id` must be for a complete production linked account. - integration_name: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given integration name. - is_test_account: - type: optional - docs: >- - If included, will only include test linked accounts. If not - included, will only include non-test linked accounts. - page_size: - type: optional - docs: Number of results to return per page. - status: - type: optional - docs: >- - Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, - `RELINK_NEEDED` - response: - docs: '' - type: fileStorageRoot.PaginatedAccountDetailsAndActionsList - status-code: 200 - examples: - - query-parameters: - category: accounting - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_user_email_address: end_user_email_address - end_user_organization_name: end_user_organization_name - end_user_origin_id: end_user_origin_id - end_user_origin_ids: end_user_origin_ids - id: id - ids: ids - include_duplicates: true - integration_name: integration_name - is_test_account: is_test_account - page_size: 1 - status: status - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: e59b1821-f85c-4e28-a6b3-1804156f3563 - category: hris - status: COMPLETE - status_detail: Invalid login credentials - end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d - end_user_organization_name: Foo Bar, LLC - end_user_email_address: hradmin@foobar.dev - subdomain: foobar - webhook_listener_url: >- - https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: true - integration: - name: name - categories: - - hris - color: color - slug: slug - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - account_type: PRODUCTION - completed_at: '2024-08-26T20:11:19Z' - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/passthrough.yml b/.mock/definition/FileStorage/passthrough.yml deleted file mode 100644 index 9854d3a1d..000000000 --- a/.mock/definition/FileStorage/passthrough.yml +++ /dev/null @@ -1,42 +0,0 @@ -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /filestorage/v1/passthrough - method: POST - auth: - - tokenAuth: [] - docs: Pull data from an endpoint not currently supported by Merge. - source: - openapi: filestorage_v3.yml - request: - body: fileStorageRoot.DataPassthroughRequest - content-type: application/json - response: - docs: '' - type: fileStorageRoot.RemoteResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - method: GET - path: /scooters - response: - body: - method: GET - path: /scooters - status: 200 - response: - key: value - response_headers: - X-Page-Token: value - response_type: JSON - headers: - EXTRA-HEADER: value - Authorization: - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/regenerateKey.yml b/.mock/definition/FileStorage/regenerateKey.yml deleted file mode 100644 index e23e337c1..000000000 --- a/.mock/definition/FileStorage/regenerateKey.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /filestorage/v1/regenerate-key - method: POST - auth: - - tokenAuth: [] - docs: Exchange remote keys. - source: - openapi: filestorage_v3.yml - request: - name: RemoteKeyForRegenerationRequest - body: - properties: - name: - type: string - docs: The name of the remote key - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: fileStorageRoot.RemoteKey - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - name: Remote Deployment Key 1 - response: - body: - name: Remote Deployment Key 1 - key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/scopes.yml b/.mock/definition/FileStorage/scopes.yml deleted file mode 100644 index 49e604af9..000000000 --- a/.mock/definition/FileStorage/scopes.yml +++ /dev/null @@ -1,168 +0,0 @@ -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - default_scopes_retrieve: - path: /filestorage/v1/default-scopes - method: GET - auth: - - tokenAuth: [] - docs: >- - Get the default permissions for Merge Common Models and fields across - all Linked Accounts of a given category. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - source: - openapi: filestorage_v3.yml - response: - docs: '' - type: fileStorageRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - linked_account_scopes_retrieve: - path: /filestorage/v1/linked-account-scopes - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all available permissions for Merge Common Models and fields for a - single Linked Account. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - source: - openapi: filestorage_v3.yml - response: - docs: '' - type: fileStorageRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - linked_account_scopes_create: - path: /filestorage/v1/linked-account-scopes - method: POST - auth: - - tokenAuth: [] - docs: >- - Update permissions for any Common Model or field for a single Linked - Account. Any Scopes not set in this POST request will inherit the - default Scopes. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) - source: - openapi: filestorage_v3.yml - request: - name: LinkedAccountCommonModelScopeDeserializerRequest - body: - properties: - common_models: - docs: The common models you want to update the scopes for - type: >- - list - content-type: application/json - response: - docs: '' - type: fileStorageRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - home_location - disabled_fields: - - work_location - - model_name: Benefit - model_permissions: - WRITE: - is_enabled: false - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/syncStatus.yml b/.mock/definition/FileStorage/syncStatus.yml deleted file mode 100644 index ffa8a978c..000000000 --- a/.mock/definition/FileStorage/syncStatus.yml +++ /dev/null @@ -1,64 +0,0 @@ -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /filestorage/v1/sync-status - method: GET - auth: - - tokenAuth: [] - docs: >- - Get sync status for the current sync and the most recently finished - sync. `last_sync_start` represents the most recent time any sync began. - `last_sync_finished` represents the most recent time any sync completed. - These timestamps may correspond to different sync instances which may - result in a sync start time being later than a separate sync completed - time. To ensure you are retrieving the latest available data reference - the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. - Possible values for `status` and `last_sync_result` are `DISABLED`, - `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more - about sync status in our [Help - Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: filestorage_v3.yml - request: - name: SyncStatusListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: fileStorageRoot.PaginatedSyncStatusList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - model_name: File - model_id: filestorage.FileStorageFile - last_sync_start: '2021-03-30T19:44:18Z' - next_sync_start: '2021-03-30T20:44:18Z' - last_sync_result: SYNCING - last_sync_finished: '2021-03-30T19:55:18Z' - status: SYNCING - is_initial_sync: true - selective_sync_configurations_usage: IN_NEXT_SYNC - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/users.yml b/.mock/definition/FileStorage/users.yml deleted file mode 100644 index 9a388d309..000000000 --- a/.mock/definition/FileStorage/users.yml +++ /dev/null @@ -1,166 +0,0 @@ -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /filestorage/v1/users - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `User` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: filestorage_v3.yml - request: - name: UsersListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_me: - type: optional - docs: If provided, will only return the user object for requestor. - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: fileStorageRoot.PaginatedUserList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - is_me: is_me - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 83902e75-4362-4803-b76c-a7d6be292cbd - remote_id: '2039349' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Gil Feig - email_address: hello@merge.dev - is_me: true - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /users - data: - - Varies by platform - retrieve: - path: /filestorage/v1/users/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `User` object with the given `id`. - source: - openapi: filestorage_v3.yml - path-parameters: - id: string - request: - name: UsersRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: fileStorageRoot.User - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 83902e75-4362-4803-b76c-a7d6be292cbd - remote_id: '2039349' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Gil Feig - email_address: hello@merge.dev - is_me: true - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /users - data: - - Varies by platform - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/webhookReceivers.yml b/.mock/definition/FileStorage/webhookReceivers.yml deleted file mode 100644 index fa7e6fd38..000000000 --- a/.mock/definition/FileStorage/webhookReceivers.yml +++ /dev/null @@ -1,65 +0,0 @@ -imports: - fileStorageRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /filestorage/v1/webhook-receivers - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `WebhookReceiver` objects. - source: - openapi: filestorage_v3.yml - response: - docs: '' - type: list - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - - event: event - is_active: true - key: key - create: - path: /filestorage/v1/webhook-receivers - method: POST - auth: - - tokenAuth: [] - docs: Creates a `WebhookReceiver` object with the given values. - source: - openapi: filestorage_v3.yml - request: - name: WebhookReceiverRequest - body: - properties: - event: - type: string - validation: - minLength: 1 - is_active: boolean - key: - type: optional - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: fileStorageRoot.WebhookReceiver - status-code: 201 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - event: event - is_active: true - response: - body: - event: event - is_active: true - key: key - source: - openapi: filestorage_v3.yml diff --git a/.mock/definition/HRIS/__package__.yml b/.mock/definition/HRIS/__package__.yml deleted file mode 100644 index 61e76ec25..000000000 --- a/.mock/definition/HRIS/__package__.yml +++ /dev/null @@ -1,7710 +0,0 @@ -types: - AccountDetailsCategory: - discriminated: false - union: - - CategoryEnum - - string - source: - openapi: hris_v3.yml - inline: true - AccountDetails: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - integration: - type: optional - access: read-only - integration_slug: - type: optional - access: read-only - category: optional - end_user_origin_id: - type: optional - access: read-only - end_user_organization_name: - type: optional - access: read-only - end_user_email_address: - type: optional - validation: - format: email - access: read-only - status: - type: optional - access: read-only - webhook_listener_url: - type: optional - validation: - format: uri - access: read-only - is_duplicate: - type: optional - docs: >- - Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test - Linked Accounts, incomplete Production Linked Accounts, and ignored - duplicate Production Linked Account sets. - access: read-only - account_type: - type: optional - access: read-only - completed_at: - type: optional - docs: The time at which account completes the linking flow. - source: - openapi: hris_v3.yml - AccountDetailsAndActionsCategory: - discriminated: false - union: - - CategoryEnum - - string - source: - openapi: hris_v3.yml - inline: true - AccountDetailsAndActionsStatus: - discriminated: false - union: - - AccountDetailsAndActionsStatusEnum - - string - source: - openapi: hris_v3.yml - inline: true - AccountDetailsAndActions: - docs: >- - # The LinkedAccount Object - - ### Description - - The `LinkedAccount` object is used to represent an end user's link with a - specific integration. - - - ### Usage Example - - View a list of your organization's `LinkedAccount` objects. - properties: - id: string - category: optional - status: AccountDetailsAndActionsStatus - status_detail: optional - end_user_origin_id: optional - end_user_organization_name: string - end_user_email_address: string - subdomain: - type: optional - docs: The tenant or domain the customer has provided access to. - webhook_listener_url: string - is_duplicate: - type: optional - docs: >- - Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test - Linked Accounts, incomplete Production Linked Accounts, and ignored - duplicate Production Linked Account sets. - integration: optional - account_type: string - completed_at: datetime - source: - openapi: hris_v3.yml - AccountDetailsAndActionsIntegration: - properties: - name: string - categories: list - image: optional - square_image: optional - color: string - slug: string - passthrough_available: boolean - available_model_operations: optional> - source: - openapi: hris_v3.yml - AccountDetailsAndActionsStatusEnum: - enum: - - COMPLETE - - INCOMPLETE - - RELINK_NEEDED - - IDLE - docs: |- - * `COMPLETE` - COMPLETE - * `INCOMPLETE` - INCOMPLETE - * `RELINK_NEEDED` - RELINK_NEEDED - * `IDLE` - IDLE - source: - openapi: hris_v3.yml - AccountIntegration: - properties: - name: - type: string - docs: Company name. - abbreviated_name: - type: optional - docs: >- - Optional. This shortened name appears in places with limited space, - usually in conjunction with the platform's logo (e.g., Merge Link - menu).

Example: Workforce Now (in lieu of ADP Workforce - Now), SuccessFactors (in lieu of SAP SuccessFactors) - categories: - type: optional> - docs: >- - Category or categories this integration belongs to. Multiple - categories should be comma separated, i.e. [ats, hris]. - access: read-only - image: - type: optional - docs: Company logo in rectangular shape. - validation: - format: uri - square_image: - type: optional - docs: Company logo in square shape. - validation: - format: uri - color: - type: optional - docs: >- - The color of this integration used for buttons and text throughout the - app and landing pages. Choose a darker, saturated color. - validation: - pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ - maxLength: 18 - slug: - type: optional - access: read-only - api_endpoints_to_documentation_urls: - type: optional> - docs: >- - Mapping of API endpoints to documentation urls for support. Example: - {'GET': [['/common-model-scopes', - 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', - 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], - 'POST': []} - webhook_setup_guide_url: - type: optional - docs: >- - Setup guide URL for third party webhook creation. Exposed in Merge - Docs. - category_beta_status: - type: optional> - docs: Category or categories this integration is in beta status for. - access: read-only - source: - openapi: hris_v3.yml - AccountToken: - properties: - account_token: string - integration: AccountIntegration - id: string - source: - openapi: hris_v3.yml - AccountTypeEnum: - enum: - - SAVINGS - - CHECKING - docs: |- - * `SAVINGS` - SAVINGS - * `CHECKING` - CHECKING - source: - openapi: hris_v3.yml - AdvancedMetadata: - properties: - id: - type: string - validation: - format: uuid - display_name: optional - description: optional - is_required: optional - is_custom: optional - field_choices: optional> - source: - openapi: hris_v3.yml - AsyncPassthroughReciept: - properties: - async_passthrough_receipt_id: - type: string - validation: - format: uuid - source: - openapi: hris_v3.yml - AuditLogEventRole: - discriminated: false - docs: >- - Designates the role of the user (or SYSTEM/API if action not taken by a - user) at the time of this Event occurring. - - - * `ADMIN` - ADMIN - - * `DEVELOPER` - DEVELOPER - - * `MEMBER` - MEMBER - - * `API` - API - - * `SYSTEM` - SYSTEM - - * `MERGE_TEAM` - MERGE_TEAM - union: - - RoleEnum - - string - source: - openapi: hris_v3.yml - inline: true - AuditLogEventEventType: - discriminated: false - docs: >- - Designates the type of event that occurred. - - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - union: - - EventTypeEnum - - string - source: - openapi: hris_v3.yml - inline: true - AuditLogEvent: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - user_name: - type: optional - docs: The User's full name at the time of this Event occurring. - validation: - maxLength: 200 - user_email: - type: optional - docs: The User's email at the time of this Event occurring. - validation: - format: email - maxLength: 254 - role: - type: AuditLogEventRole - docs: >- - Designates the role of the user (or SYSTEM/API if action not taken by - a user) at the time of this Event occurring. - - - * `ADMIN` - ADMIN - - * `DEVELOPER` - DEVELOPER - - * `MEMBER` - MEMBER - - * `API` - API - - * `SYSTEM` - SYSTEM - - * `MERGE_TEAM` - MERGE_TEAM - ip_address: - type: string - validation: - maxLength: 45 - event_type: - type: AuditLogEventEventType - docs: >- - Designates the type of event that occurred. - - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - event_description: string - created_at: - type: optional - access: read-only - source: - openapi: hris_v3.yml - AvailableActions: - docs: >- - # The AvailableActions Object - - ### Description - - The `Activity` object is used to see all available model/operation - combinations for an integration. - - - ### Usage Example - - Fetch all the actions available for the `Zenefits` integration. - properties: - integration: AccountIntegration - passthrough_available: boolean - available_model_operations: optional> - source: - openapi: hris_v3.yml - BankInfoEmployee: - discriminated: false - docs: The employee with this bank account. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: hris_v3.yml - inline: true - BankInfoAccountType: - discriminated: false - docs: |- - The bank account type - - * `SAVINGS` - SAVINGS - * `CHECKING` - CHECKING - union: - - AccountTypeEnum - - string - source: - openapi: hris_v3.yml - inline: true - BankInfo: - docs: >- - # The BankInfo Object - - ### Description - - The `BankInfo` object is used to represent the Bank Account information - for an Employee. - - - ### Usage Example - - Fetch from the `LIST BankInfo` endpoint and filter by `ID` to show all - bank information. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - employee: - type: optional - docs: The employee with this bank account. - account_number: - type: optional - docs: The account number. - validation: - maxLength: 100 - routing_number: - type: optional - docs: The routing number. - bank_name: - type: optional - docs: The bank name. - account_type: - type: optional - docs: |- - The bank account type - - * `SAVINGS` - SAVINGS - * `CHECKING` - CHECKING - remote_created_at: - type: optional - docs: When the matching bank object was created in the third party system. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - BenefitEmployee: - discriminated: false - docs: The employee on the plan. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: hris_v3.yml - inline: true - Benefit: - docs: >- - # The Benefit Object - - ### Description - - The `Benefit` object is used to represent a benefit that an employee has - enrolled in. - - - ### Usage Example - - Fetch from the `LIST Benefits` endpoint and filter by `ID` to show all - benefits. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - employee: - type: optional - docs: The employee on the plan. - provider_name: - type: optional - docs: The name of the benefit provider. - benefit_plan_type: - type: optional - docs: The type of benefit plan - availability: deprecated - employee_contribution: - type: optional - docs: The employee's contribution. - company_contribution: - type: optional - docs: The company's contribution. - start_date: - type: optional - docs: The day and time the benefit started. - end_date: - type: optional - docs: The day and time the benefit ended. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - employer_benefit: - type: optional - docs: The employer benefit plan the employee is enrolled in. - validation: - format: uuid - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - BenefitPlanTypeEnum: - enum: - - MEDICAL - - HEALTH_SAVINGS - - INSURANCE - - RETIREMENT - - OTHER - docs: |- - * `MEDICAL` - MEDICAL - * `HEALTH_SAVINGS` - HEALTH_SAVINGS - * `INSURANCE` - INSURANCE - * `RETIREMENT` - RETIREMENT - * `OTHER` - OTHER - source: - openapi: hris_v3.yml - CategoriesEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - docs: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - source: - openapi: hris_v3.yml - CategoryEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - docs: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - source: - openapi: hris_v3.yml - CommonModelScopeApi: - properties: - common_models: - docs: The common models you want to update the scopes for - type: list - source: - openapi: hris_v3.yml - CommonModelScopesBodyRequest: - properties: - model_id: - type: string - validation: - minLength: 1 - enabled_actions: list - disabled_fields: list - source: - openapi: hris_v3.yml - Company: - docs: >- - # The Company Object - - ### Description - - The `Company` object is used to represent a company within the HRIS / - Payroll system. - - - ### Usage Example - - Fetch from the `LIST Companies` endpoint and filter by `ID` to show all - companies. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - legal_name: - type: optional - docs: The company's legal name. - display_name: - type: optional - docs: The company's display name. - eins: - type: optional>> - docs: The company's Employer Identification Numbers. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - CountryEnum: - enum: - - AF - - AX - - AL - - DZ - - AS - - AD - - AO - - AI - - AQ - - AG - - AR - - AM - - AW - - AU - - AT - - AZ - - BS - - BH - - BD - - BB - - BY - - BE - - BZ - - BJ - - BM - - BT - - BO - - BQ - - BA - - BW - - BV - - BR - - IO - - BN - - BG - - BF - - BI - - CV - - KH - - CM - - CA - - KY - - CF - - TD - - CL - - CN - - CX - - CC - - CO - - KM - - CG - - CD - - CK - - CR - - CI - - HR - - CU - - CW - - CY - - CZ - - DK - - DJ - - DM - - DO - - EC - - EG - - SV - - GQ - - ER - - EE - - SZ - - ET - - FK - - FO - - FJ - - FI - - FR - - GF - - PF - - TF - - GA - - GM - - GE - - DE - - GH - - GI - - GR - - GL - - GD - - GP - - GU - - GT - - GG - - GN - - GW - - GY - - HT - - HM - - VA - - HN - - HK - - HU - - IS - - IN - - ID - - IR - - IQ - - IE - - IM - - IL - - IT - - JM - - JP - - JE - - JO - - KZ - - KE - - KI - - KW - - KG - - LA - - LV - - LB - - LS - - LR - - LY - - LI - - LT - - LU - - MO - - MG - - MW - - MY - - MV - - ML - - MT - - MH - - MQ - - MR - - MU - - YT - - MX - - FM - - MD - - MC - - MN - - ME - - MS - - MA - - MZ - - MM - - NA - - NR - - NP - - NL - - NC - - NZ - - NI - - NE - - NG - - NU - - NF - - KP - - MK - - MP - - 'NO' - - OM - - PK - - PW - - PS - - PA - - PG - - PY - - PE - - PH - - PN - - PL - - PT - - PR - - QA - - RE - - RO - - RU - - RW - - BL - - SH - - KN - - LC - - MF - - PM - - VC - - WS - - SM - - ST - - SA - - SN - - RS - - SC - - SL - - SG - - SX - - SK - - SI - - SB - - SO - - ZA - - GS - - KR - - SS - - ES - - LK - - SD - - SR - - SJ - - SE - - CH - - SY - - TW - - TJ - - TZ - - TH - - TL - - TG - - TK - - TO - - TT - - TN - - TR - - TM - - TC - - TV - - UG - - UA - - AE - - GB - - UM - - US - - UY - - UZ - - VU - - VE - - VN - - VG - - VI - - WF - - EH - - YE - - ZM - - ZW - docs: |- - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - source: - openapi: hris_v3.yml - DataPassthroughRequest: - docs: >- - # The DataPassthrough Object - - ### Description - - The `DataPassthrough` object is used to send information to an - otherwise-unsupported third-party endpoint. - - - ### Usage Example - - Create a `DataPassthrough` to get team hierarchies from your Rippling - integration. - properties: - method: MethodEnum - path: - type: string - docs: The path of the request in the third party's platform. - validation: - minLength: 1 - base_url_override: - type: optional - docs: An optional override of the third party's base url for the request. - validation: - minLength: 1 - data: - type: optional - docs: >- - The data with the request. You must include a `request_format` - parameter matching the data's format - validation: - minLength: 1 - multipart_form_data: - type: optional> - docs: >- - Pass an array of `MultipartFormField` objects in here instead of using - the `data` param if `request_format` is set to `MULTIPART`. - headers: - type: optional> - docs: >- - The headers to use for the request (Merge will handle the account's - authorization headers). `Content-Type` header is required for - passthrough. Choose content type corresponding to expected format of - receiving server. - request_format: optional - normalize_response: - type: optional - docs: >- - Optional. If true, the response will always be an object of the form - `{"type": T, "value": ...}` where `T` will be one of `string, boolean, - number, null, array, object`. - source: - openapi: hris_v3.yml - DebugModeLog: - properties: - log_id: string - dashboard_view: string - log_summary: DebugModelLogSummary - source: - openapi: hris_v3.yml - DebugModelLogSummary: - properties: - url: string - method: string - status_code: integer - source: - openapi: hris_v3.yml - Deduction: - docs: >- - # The Deduction Object - - ### Description - - The `Deduction` object is used to represent an array of the wages withheld - from total earnings for the purpose of paying taxes. - - - ### Usage Example - - Fetch from the `LIST Deductions` endpoint and filter by `ID` to show all - deductions. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - employee_payroll_run: - type: optional - validation: - format: uuid - name: - type: optional - docs: The deduction's name. - employee_deduction: - type: optional - docs: >- - The amount of money that is withheld from an employee's gross pay by - the employee. - company_deduction: - type: optional - docs: >- - The amount of money that is withheld on behalf of an employee by the - company. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - DependentRelationship: - discriminated: false - docs: |- - The dependent's relationship to the employee. - - * `CHILD` - CHILD - * `SPOUSE` - SPOUSE - * `DOMESTIC_PARTNER` - DOMESTIC_PARTNER - union: - - RelationshipEnum - - string - source: - openapi: hris_v3.yml - inline: true - DependentGender: - discriminated: false - docs: |- - The dependent's gender. - - * `MALE` - MALE - * `FEMALE` - FEMALE - * `NON-BINARY` - NON-BINARY - * `OTHER` - OTHER - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - union: - - GenderEnum - - string - source: - openapi: hris_v3.yml - inline: true - Dependent: - docs: >- - # The Dependent Object - - ### Description - - The `Dependent` object is used to represent a dependent (e.g. child, - spouse, domestic partner, etc) of an `Employee` - - - ### Usage Example - - Fetch from the `LIST Dependents` endpoint and filter by `ID` to show all - dependents. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - first_name: - type: optional - docs: The dependents's first name. - validation: - maxLength: 60 - middle_name: - type: optional - docs: The dependents's middle name. - validation: - maxLength: 60 - last_name: - type: optional - docs: The dependents's last name. - validation: - maxLength: 60 - relationship: - type: optional - docs: |- - The dependent's relationship to the employee. - - * `CHILD` - CHILD - * `SPOUSE` - SPOUSE - * `DOMESTIC_PARTNER` - DOMESTIC_PARTNER - employee: - type: optional - docs: The employee this person is a dependent of. - validation: - format: uuid - date_of_birth: - type: optional - docs: The dependent's date of birth. - gender: - type: optional - docs: |- - The dependent's gender. - - * `MALE` - MALE - * `FEMALE` - FEMALE - * `NON-BINARY` - NON-BINARY - * `OTHER` - OTHER - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - phone_number: - type: optional - docs: The dependent's phone number. - validation: - maxLength: 50 - home_location: - type: optional - docs: The dependents's home address. - validation: - format: uuid - is_student: - type: optional - docs: Whether or not the dependent is a student - ssn: - type: optional - docs: The dependents's social security number. - validation: - maxLength: 50 - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - EarningType: - discriminated: false - docs: |- - The type of earning. - - * `SALARY` - SALARY - * `REIMBURSEMENT` - REIMBURSEMENT - * `OVERTIME` - OVERTIME - * `BONUS` - BONUS - union: - - EarningTypeEnum - - string - source: - openapi: hris_v3.yml - inline: true - Earning: - docs: >- - # The Earning Object - - ### Description - - The `Earning` object is used to represent an array of different - compensations that an employee receives within specific wage categories. - - - ### Usage Example - - Fetch from the `LIST Earnings` endpoint and filter by `ID` to show all - earnings. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - employee_payroll_run: - type: optional - validation: - format: uuid - amount: - type: optional - docs: The amount earned. - type: - type: optional - docs: |- - The type of earning. - - * `SALARY` - SALARY - * `REIMBURSEMENT` - REIMBURSEMENT - * `OVERTIME` - OVERTIME - * `BONUS` - BONUS - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - EarningTypeEnum: - enum: - - SALARY - - REIMBURSEMENT - - OVERTIME - - BONUS - docs: |- - * `SALARY` - SALARY - * `REIMBURSEMENT` - REIMBURSEMENT - * `OVERTIME` - OVERTIME - * `BONUS` - BONUS - source: - openapi: hris_v3.yml - EmployeeCompany: - discriminated: false - docs: The ID of the employee's company. - union: - - type: string - validation: - format: uuid - - Company - source: - openapi: hris_v3.yml - inline: true - EmployeeGroupsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Group - source: - openapi: hris_v3.yml - inline: true - EmployeeEmploymentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Employment - source: - openapi: hris_v3.yml - inline: true - EmployeeHomeLocation: - discriminated: false - docs: The employee's home address. - union: - - type: string - validation: - format: uuid - - Location - source: - openapi: hris_v3.yml - inline: true - EmployeeWorkLocation: - discriminated: false - docs: The employee's work address. - union: - - type: string - validation: - format: uuid - - Location - source: - openapi: hris_v3.yml - inline: true - EmployeeManager: - discriminated: false - docs: The employee ID of the employee's manager. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: hris_v3.yml - inline: true - EmployeeTeam: - discriminated: false - docs: The employee's team. - union: - - type: string - validation: - format: uuid - - Team - source: - openapi: hris_v3.yml - inline: true - EmployeePayGroup: - discriminated: false - docs: The employee's pay group - union: - - type: string - validation: - format: uuid - - PayGroup - source: - openapi: hris_v3.yml - inline: true - EmployeeGender: - discriminated: false - docs: |- - The employee's gender. - - * `MALE` - MALE - * `FEMALE` - FEMALE - * `NON-BINARY` - NON-BINARY - * `OTHER` - OTHER - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - union: - - GenderEnum - - string - source: - openapi: hris_v3.yml - inline: true - EmployeeEthnicity: - discriminated: false - docs: >- - The employee's ethnicity. - - - * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE - - * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT - - * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN - - * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO - - * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - - * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES - - * `WHITE` - WHITE - - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - union: - - EthnicityEnum - - string - source: - openapi: hris_v3.yml - inline: true - EmployeeMaritalStatus: - discriminated: false - docs: >- - The employee's filing status as related to marital status. - - - * `SINGLE` - SINGLE - - * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY - - * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY - - * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD - - * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD - union: - - MaritalStatusEnum - - string - source: - openapi: hris_v3.yml - inline: true - EmployeeEmploymentStatus: - discriminated: false - docs: |- - The employment status of the employee. - - * `ACTIVE` - ACTIVE - * `PENDING` - PENDING - * `INACTIVE` - INACTIVE - union: - - EmploymentStatusEnum - - string - source: - openapi: hris_v3.yml - inline: true - Employee: - docs: >- - # The Employee Object - - ### Description - - The `Employee` object is used to represent any person who has been - employed by a company. By default, it returns all employees. To filter for - only active employees, set the `employment_status` query parameter to - `ACTIVE`. - - - ### Usage Example - - Fetch from the `LIST Employee` endpoint and filter by `ID` to show all - employees. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - employee_number: - type: optional - docs: >- - The employee's number that appears in the third-party integration's - UI. - company: - type: optional - docs: The ID of the employee's company. - first_name: - type: optional - docs: The employee's first name. - last_name: - type: optional - docs: The employee's last name. - preferred_name: - type: optional - docs: The employee's preferred first name. - display_full_name: - type: optional - docs: >- - The employee's full name, to use for display purposes. If a preferred - first name is available, the full name will include the preferred - first name. - username: - type: optional - docs: The employee's username that appears in the remote UI. - groups: optional>> - work_email: - type: optional - docs: The employee's work email. - validation: - format: email - maxLength: 254 - personal_email: - type: optional - docs: The employee's personal email. - validation: - format: email - maxLength: 254 - mobile_phone_number: - type: optional - docs: The employee's mobile phone number. - employments: - type: optional>> - docs: Array of `Employment` IDs for this Employee. - home_location: - type: optional - docs: The employee's home address. - work_location: - type: optional - docs: The employee's work address. - manager: - type: optional - docs: The employee ID of the employee's manager. - team: - type: optional - docs: The employee's team. - availability: deprecated - pay_group: - type: optional - docs: The employee's pay group - ssn: - type: optional - docs: The employee's social security number. - validation: - maxLength: 100 - gender: - type: optional - docs: |- - The employee's gender. - - * `MALE` - MALE - * `FEMALE` - FEMALE - * `NON-BINARY` - NON-BINARY - * `OTHER` - OTHER - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - ethnicity: - type: optional - docs: >- - The employee's ethnicity. - - - * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - - AMERICAN_INDIAN_OR_ALASKA_NATIVE - - * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT - - * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN - - * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO - - * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - - * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES - - * `WHITE` - WHITE - - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - marital_status: - type: optional - docs: >- - The employee's filing status as related to marital status. - - - * `SINGLE` - SINGLE - - * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY - - * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY - - * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD - - * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD - date_of_birth: - type: optional - docs: The employee's date of birth. - hire_date: - type: optional - docs: >- - The date that the employee was hired, usually the day that an offer - letter is signed. If an employee has multiple hire dates from previous - employments, this represents the most recent hire date. Note: If - you're looking for the employee's start date, refer to the start_date - field. - availability: deprecated - start_date: - type: optional - docs: >- - The date that the employee started working. If an employee was - rehired, the most recent start date will be returned. - remote_created_at: - type: optional - docs: When the third party's employee was created. - employment_status: - type: optional - docs: |- - The employment status of the employee. - - * `ACTIVE` - ACTIVE - * `PENDING` - PENDING - * `INACTIVE` - INACTIVE - termination_date: - type: optional - docs: The employee's termination date. - avatar: - type: optional - docs: The URL of the employee's avatar image. - validation: - format: uri - maxLength: 2000 - custom_fields: - type: optional> - docs: Custom fields configured for a given model. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - EmployeePayrollRunEmployee: - discriminated: false - docs: The employee whose payroll is being run. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: hris_v3.yml - inline: true - EmployeePayrollRunPayrollRun: - discriminated: false - docs: The payroll being run. - union: - - type: string - validation: - format: uuid - - PayrollRun - source: - openapi: hris_v3.yml - inline: true - EmployeePayrollRun: - docs: >- - # The EmployeePayrollRun Object - - ### Description - - The `EmployeePayrollRun` object is used to represent an employee's pay - statement for a specific payroll run. - - - ### Usage Example - - Fetch from the `LIST EmployeePayrollRun` endpoint and filter by `ID` to - show all employee payroll runs. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - employee: - type: optional - docs: The employee whose payroll is being run. - payroll_run: - type: optional - docs: The payroll being run. - gross_pay: - type: optional - docs: >- - The total earnings throughout a given period for an employee before - any deductions are made. - net_pay: - type: optional - docs: >- - The take-home pay throughout a given period for an employee after - deductions are made. - start_date: - type: optional - docs: The day and time the payroll run started. - end_date: - type: optional - docs: The day and time the payroll run ended. - check_date: - type: optional - docs: The day and time the payroll run was checked. - earnings: - type: optional> - access: read-only - deductions: - type: optional> - access: read-only - taxes: - type: optional> - access: read-only - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - EmployeeRequestCompany: - discriminated: false - docs: The ID of the employee's company. - union: - - type: string - validation: - format: uuid - - Company - source: - openapi: hris_v3.yml - inline: true - EmployeeRequestGroupsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Group - source: - openapi: hris_v3.yml - inline: true - EmployeeRequestEmploymentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Employment - source: - openapi: hris_v3.yml - inline: true - EmployeeRequestHomeLocation: - discriminated: false - docs: The employee's home address. - union: - - type: string - validation: - format: uuid - - Location - source: - openapi: hris_v3.yml - inline: true - EmployeeRequestWorkLocation: - discriminated: false - docs: The employee's work address. - union: - - type: string - validation: - format: uuid - - Location - source: - openapi: hris_v3.yml - inline: true - EmployeeRequestManager: - discriminated: false - docs: The employee ID of the employee's manager. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: hris_v3.yml - inline: true - EmployeeRequestTeam: - discriminated: false - docs: The employee's team. - union: - - type: string - validation: - format: uuid - - Team - source: - openapi: hris_v3.yml - inline: true - EmployeeRequestPayGroup: - discriminated: false - docs: The employee's pay group - union: - - type: string - validation: - format: uuid - - PayGroup - source: - openapi: hris_v3.yml - inline: true - EmployeeRequestGender: - discriminated: false - docs: |- - The employee's gender. - - * `MALE` - MALE - * `FEMALE` - FEMALE - * `NON-BINARY` - NON-BINARY - * `OTHER` - OTHER - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - union: - - GenderEnum - - string - source: - openapi: hris_v3.yml - inline: true - EmployeeRequestEthnicity: - discriminated: false - docs: >- - The employee's ethnicity. - - - * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE - - * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT - - * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN - - * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO - - * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - - * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES - - * `WHITE` - WHITE - - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - union: - - EthnicityEnum - - string - source: - openapi: hris_v3.yml - inline: true - EmployeeRequestMaritalStatus: - discriminated: false - docs: >- - The employee's filing status as related to marital status. - - - * `SINGLE` - SINGLE - - * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY - - * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY - - * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD - - * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD - union: - - MaritalStatusEnum - - string - source: - openapi: hris_v3.yml - inline: true - EmployeeRequestEmploymentStatus: - discriminated: false - docs: |- - The employment status of the employee. - - * `ACTIVE` - ACTIVE - * `PENDING` - PENDING - * `INACTIVE` - INACTIVE - union: - - EmploymentStatusEnum - - string - source: - openapi: hris_v3.yml - inline: true - EmployeeRequest: - docs: >- - # The Employee Object - - ### Description - - The `Employee` object is used to represent any person who has been - employed by a company. By default, it returns all employees. To filter for - only active employees, set the `employment_status` query parameter to - `ACTIVE`. - - - ### Usage Example - - Fetch from the `LIST Employee` endpoint and filter by `ID` to show all - employees. - properties: - employee_number: - type: optional - docs: >- - The employee's number that appears in the third-party integration's - UI. - company: - type: optional - docs: The ID of the employee's company. - first_name: - type: optional - docs: The employee's first name. - last_name: - type: optional - docs: The employee's last name. - preferred_name: - type: optional - docs: The employee's preferred first name. - display_full_name: - type: optional - docs: >- - The employee's full name, to use for display purposes. If a preferred - first name is available, the full name will include the preferred - first name. - username: - type: optional - docs: The employee's username that appears in the remote UI. - groups: optional>> - work_email: - type: optional - docs: The employee's work email. - validation: - format: email - maxLength: 254 - personal_email: - type: optional - docs: The employee's personal email. - validation: - format: email - maxLength: 254 - mobile_phone_number: - type: optional - docs: The employee's mobile phone number. - employments: - type: optional>> - docs: Array of `Employment` IDs for this Employee. - home_location: - type: optional - docs: The employee's home address. - work_location: - type: optional - docs: The employee's work address. - manager: - type: optional - docs: The employee ID of the employee's manager. - team: - type: optional - docs: The employee's team. - availability: deprecated - pay_group: - type: optional - docs: The employee's pay group - ssn: - type: optional - docs: The employee's social security number. - validation: - maxLength: 100 - gender: - type: optional - docs: |- - The employee's gender. - - * `MALE` - MALE - * `FEMALE` - FEMALE - * `NON-BINARY` - NON-BINARY - * `OTHER` - OTHER - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - ethnicity: - type: optional - docs: >- - The employee's ethnicity. - - - * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - - AMERICAN_INDIAN_OR_ALASKA_NATIVE - - * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT - - * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN - - * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO - - * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - - * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES - - * `WHITE` - WHITE - - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - marital_status: - type: optional - docs: >- - The employee's filing status as related to marital status. - - - * `SINGLE` - SINGLE - - * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY - - * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY - - * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD - - * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD - date_of_birth: - type: optional - docs: The employee's date of birth. - hire_date: - type: optional - docs: >- - The date that the employee was hired, usually the day that an offer - letter is signed. If an employee has multiple hire dates from previous - employments, this represents the most recent hire date. Note: If - you're looking for the employee's start date, refer to the start_date - field. - availability: deprecated - start_date: - type: optional - docs: >- - The date that the employee started working. If an employee was - rehired, the most recent start date will be returned. - employment_status: - type: optional - docs: |- - The employment status of the employee. - - * `ACTIVE` - ACTIVE - * `PENDING` - PENDING - * `INACTIVE` - INACTIVE - termination_date: - type: optional - docs: The employee's termination date. - avatar: - type: optional - docs: The URL of the employee's avatar image. - validation: - format: uri - maxLength: 2000 - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: hris_v3.yml - EmployeeResponse: - properties: - model: Employee - warnings: list - errors: list - logs: optional> - source: - openapi: hris_v3.yml - EmployerBenefitBenefitPlanType: - discriminated: false - docs: |- - The type of benefit plan. - - * `MEDICAL` - MEDICAL - * `HEALTH_SAVINGS` - HEALTH_SAVINGS - * `INSURANCE` - INSURANCE - * `RETIREMENT` - RETIREMENT - * `OTHER` - OTHER - union: - - BenefitPlanTypeEnum - - string - source: - openapi: hris_v3.yml - inline: true - EmployerBenefit: - docs: >- - # The EmployerBenefit Object - - ### Description - - The `Employer Benefit` object is used to represent a benefit plan offered - by a company. - - - ### Usage Example - - Fetch from the `LIST EmployerBenefits` endpoint and filter by `ID` to show - all EmployerBenefits. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - benefit_plan_type: - type: optional - docs: |- - The type of benefit plan. - - * `MEDICAL` - MEDICAL - * `HEALTH_SAVINGS` - HEALTH_SAVINGS - * `INSURANCE` - INSURANCE - * `RETIREMENT` - RETIREMENT - * `OTHER` - OTHER - name: - type: optional - docs: The employer benefit's name - typically the carrier or network name. - validation: - maxLength: 200 - description: - type: optional - docs: The employer benefit's description. - validation: - maxLength: 2000 - deduction_code: - type: optional - docs: The employer benefit's deduction code. - validation: - maxLength: 60 - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - EmploymentEmployee: - discriminated: false - docs: The employee holding this position. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: hris_v3.yml - inline: true - EmploymentPayPeriod: - discriminated: false - docs: |- - The time period this pay rate encompasses. - - * `HOUR` - HOUR - * `DAY` - DAY - * `WEEK` - WEEK - * `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS - * `SEMIMONTHLY` - SEMIMONTHLY - * `MONTH` - MONTH - * `QUARTER` - QUARTER - * `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS - * `YEAR` - YEAR - union: - - PayPeriodEnum - - string - source: - openapi: hris_v3.yml - inline: true - EmploymentPayFrequency: - discriminated: false - docs: |- - The position's pay frequency. - - * `WEEKLY` - WEEKLY - * `BIWEEKLY` - BIWEEKLY - * `MONTHLY` - MONTHLY - * `QUARTERLY` - QUARTERLY - * `SEMIANNUALLY` - SEMIANNUALLY - * `ANNUALLY` - ANNUALLY - * `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY - * `PRO_RATA` - PRO_RATA - * `SEMIMONTHLY` - SEMIMONTHLY - union: - - PayFrequencyEnum - - string - source: - openapi: hris_v3.yml - inline: true - EmploymentPayCurrency: - discriminated: false - docs: >- - The position's currency code. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - union: - - PayCurrencyEnum - - string - source: - openapi: hris_v3.yml - inline: true - EmploymentPayGroup: - discriminated: false - docs: The employment's pay group - union: - - type: string - validation: - format: uuid - - PayGroup - source: - openapi: hris_v3.yml - inline: true - EmploymentFlsaStatus: - discriminated: false - docs: |- - The position's FLSA status. - - * `EXEMPT` - EXEMPT - * `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT - * `NONEXEMPT` - NONEXEMPT - * `OWNER` - OWNER - union: - - FlsaStatusEnum - - string - source: - openapi: hris_v3.yml - inline: true - EmploymentEmploymentType: - discriminated: false - docs: |- - The position's type of employment. - - * `FULL_TIME` - FULL_TIME - * `PART_TIME` - PART_TIME - * `INTERN` - INTERN - * `CONTRACTOR` - CONTRACTOR - * `FREELANCE` - FREELANCE - union: - - EmploymentTypeEnum - - string - source: - openapi: hris_v3.yml - inline: true - Employment: - docs: >- - # The Employment Object - - ### Description - - The `Employment` object is used to represent a job position at a company. - - - If an integration supports historical tracking of employments, it will be - reflected in the data. If not, a new `Employment` object will be created - whenever there is a change in job title or pay. The `effective_date` field - should be used to order `Employment` objects, with the most recent date - corresponding to the latest employment record for an employee. - - - ### Usage Example - - Fetch from the `LIST Employments` endpoint and filter by `ID` to show all - employees. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - employee: - type: optional - docs: The employee holding this position. - job_title: - type: optional - docs: The position's title. - pay_rate: - type: optional - docs: The position's pay rate. - pay_period: - type: optional - docs: |- - The time period this pay rate encompasses. - - * `HOUR` - HOUR - * `DAY` - DAY - * `WEEK` - WEEK - * `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS - * `SEMIMONTHLY` - SEMIMONTHLY - * `MONTH` - MONTH - * `QUARTER` - QUARTER - * `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS - * `YEAR` - YEAR - pay_frequency: - type: optional - docs: |- - The position's pay frequency. - - * `WEEKLY` - WEEKLY - * `BIWEEKLY` - BIWEEKLY - * `MONTHLY` - MONTHLY - * `QUARTERLY` - QUARTERLY - * `SEMIANNUALLY` - SEMIANNUALLY - * `ANNUALLY` - ANNUALLY - * `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY - * `PRO_RATA` - PRO_RATA - * `SEMIMONTHLY` - SEMIMONTHLY - pay_currency: - type: optional - docs: >- - The position's currency code. - - - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - pay_group: - type: optional - docs: The employment's pay group - flsa_status: - type: optional - docs: |- - The position's FLSA status. - - * `EXEMPT` - EXEMPT - * `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT - * `NONEXEMPT` - NONEXEMPT - * `OWNER` - OWNER - effective_date: - type: optional - docs: The position's effective date. - employment_type: - type: optional - docs: |- - The position's type of employment. - - * `FULL_TIME` - FULL_TIME - * `PART_TIME` - PART_TIME - * `INTERN` - INTERN - * `CONTRACTOR` - CONTRACTOR - * `FREELANCE` - FREELANCE - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - EmploymentStatusEnum: - enum: - - ACTIVE - - PENDING - - INACTIVE - docs: |- - * `ACTIVE` - ACTIVE - * `PENDING` - PENDING - * `INACTIVE` - INACTIVE - source: - openapi: hris_v3.yml - EmploymentTypeEnum: - enum: - - FULL_TIME - - PART_TIME - - INTERN - - CONTRACTOR - - FREELANCE - docs: |- - * `FULL_TIME` - FULL_TIME - * `PART_TIME` - PART_TIME - * `INTERN` - INTERN - * `CONTRACTOR` - CONTRACTOR - * `FREELANCE` - FREELANCE - source: - openapi: hris_v3.yml - EnabledActionsEnum: - enum: - - READ - - WRITE - docs: |- - * `READ` - READ - * `WRITE` - WRITE - source: - openapi: hris_v3.yml - EncodingEnum: - enum: - - RAW - - BASE64 - - GZIP_BASE64 - docs: |- - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - source: - openapi: hris_v3.yml - ErrorValidationProblem: - properties: - source: optional - title: string - detail: string - problem_type: string - source: - openapi: hris_v3.yml - EthnicityEnum: - enum: - - AMERICAN_INDIAN_OR_ALASKA_NATIVE - - ASIAN_OR_INDIAN_SUBCONTINENT - - BLACK_OR_AFRICAN_AMERICAN - - HISPANIC_OR_LATINO - - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - - TWO_OR_MORE_RACES - - WHITE - - PREFER_NOT_TO_DISCLOSE - docs: >- - * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE - - * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT - - * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN - - * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO - - * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - - * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES - - * `WHITE` - WHITE - - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - source: - openapi: hris_v3.yml - EventTypeEnum: - enum: - - CREATED_REMOTE_PRODUCTION_API_KEY - - DELETED_REMOTE_PRODUCTION_API_KEY - - CREATED_TEST_API_KEY - - DELETED_TEST_API_KEY - - REGENERATED_PRODUCTION_API_KEY - - REGENERATED_WEBHOOK_SIGNATURE - - INVITED_USER - - TWO_FACTOR_AUTH_ENABLED - - TWO_FACTOR_AUTH_DISABLED - - DELETED_LINKED_ACCOUNT - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - CREATED_DESTINATION - - DELETED_DESTINATION - - CHANGED_DESTINATION - - CHANGED_SCOPES - - CHANGED_PERSONAL_INFORMATION - - CHANGED_ORGANIZATION_SETTINGS - - ENABLED_INTEGRATION - - DISABLED_INTEGRATION - - ENABLED_CATEGORY - - DISABLED_CATEGORY - - CHANGED_PASSWORD - - RESET_PASSWORD - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - FORCED_LINKED_ACCOUNT_RESYNC - - MUTED_ISSUE - - GENERATED_MAGIC_LINK - - ENABLED_MERGE_WEBHOOK - - DISABLED_MERGE_WEBHOOK - - MERGE_WEBHOOK_TARGET_CHANGED - - END_USER_CREDENTIALS_ACCESSED - docs: >- - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - source: - openapi: hris_v3.yml - ExternalTargetFieldApi: - properties: - name: - type: optional - access: read-only - description: - type: optional - access: read-only - is_mapped: - type: optional - access: read-only - source: - openapi: hris_v3.yml - ExternalTargetFieldApiResponse: - properties: - Benefit: optional> - EmployerBenefit: optional> - Company: optional> - EmployeePayrollRun: optional> - Employee: optional> - Employment: optional> - Location: optional> - PayrollRun: optional> - Team: optional> - TimeOff: optional> - TimeOffBalance: optional> - BankInfo: optional> - PayGroup: optional> - Group: optional> - Dependent: optional> - TimesheetEntry: optional> - source: - openapi: hris_v3.yml - FieldMappingApiInstanceTargetField: - properties: - name: string - description: string - is_organization_wide: boolean - source: - openapi: hris_v3.yml - inline: true - FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: - properties: - method: optional - url_path: optional - field_traversal_path: optional> - source: - openapi: hris_v3.yml - inline: true - FieldMappingApiInstanceRemoteField: - properties: - remote_key_name: optional - schema: optional> - remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - source: - openapi: hris_v3.yml - inline: true - FieldMappingApiInstance: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - is_integration_wide: - type: optional - access: read-only - target_field: - type: optional - access: read-only - remote_field: - type: optional - access: read-only - source: - openapi: hris_v3.yml - FieldMappingApiInstanceResponse: - properties: - Benefit: optional> - EmployerBenefit: optional> - Company: optional> - EmployeePayrollRun: optional> - Employee: optional> - Employment: optional> - Location: optional> - PayrollRun: optional> - Team: optional> - TimeOff: optional> - TimeOffBalance: optional> - BankInfo: optional> - PayGroup: optional> - Group: optional> - Dependent: optional> - TimesheetEntry: optional> - source: - openapi: hris_v3.yml - FieldMappingInstanceResponse: - properties: - model: FieldMappingApiInstance - warnings: list - errors: list - logs: optional> - source: - openapi: hris_v3.yml - FieldPermissionDeserializer: - properties: - enabled_fields: optional> - disabled_fields: optional> - source: - openapi: hris_v3.yml - FieldPermissionDeserializerRequest: - properties: - enabled_fields: optional> - disabled_fields: optional> - source: - openapi: hris_v3.yml - FlsaStatusEnum: - enum: - - EXEMPT - - SALARIED_NONEXEMPT - - NONEXEMPT - - OWNER - docs: |- - * `EXEMPT` - EXEMPT - * `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT - * `NONEXEMPT` - NONEXEMPT - * `OWNER` - OWNER - source: - openapi: hris_v3.yml - GenderEnum: - enum: - - MALE - - FEMALE - - value: NON-BINARY - name: NonBinary - - OTHER - - PREFER_NOT_TO_DISCLOSE - docs: |- - * `MALE` - MALE - * `FEMALE` - FEMALE - * `NON-BINARY` - NON-BINARY - * `OTHER` - OTHER - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - source: - openapi: hris_v3.yml - GroupType: - discriminated: false - docs: |- - The Group type returned directly from the third-party. - - * `TEAM` - TEAM - * `DEPARTMENT` - DEPARTMENT - * `COST_CENTER` - COST_CENTER - * `BUSINESS_UNIT` - BUSINESS_UNIT - * `GROUP` - GROUP - union: - - GroupTypeEnum - - string - source: - openapi: hris_v3.yml - inline: true - Group: - docs: >- - # The Group Object - - ### Description - - The `Group` object is used to represent any subset of employees across, - for example, `DEPARTMENT` or `TEAM`. Employees can be in multiple Groups. - - - ### Usage Example - - Fetch from the `LIST Employee` endpoint and expand groups to view an - employee's groups. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - parent_group: - type: optional - docs: The parent group for this group. - validation: - format: uuid - name: - type: optional - docs: The group name. - type: - type: optional - docs: |- - The Group type returned directly from the third-party. - - * `TEAM` - TEAM - * `DEPARTMENT` - DEPARTMENT - * `COST_CENTER` - COST_CENTER - * `BUSINESS_UNIT` - BUSINESS_UNIT - * `GROUP` - GROUP - is_commonly_used_as_team: - type: optional - docs: >- - Indicates whether the Group refers to a team in the third party - platform. Note that this is an opinionated view based on how Merge - observes most organizations representing teams in each third party - platform. If your customer uses a platform different from most, there - is a chance this will not be correct. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - GroupTypeEnum: - enum: - - TEAM - - DEPARTMENT - - COST_CENTER - - BUSINESS_UNIT - - GROUP - docs: |- - * `TEAM` - TEAM - * `DEPARTMENT` - DEPARTMENT - * `COST_CENTER` - COST_CENTER - * `BUSINESS_UNIT` - BUSINESS_UNIT - * `GROUP` - GROUP - source: - openapi: hris_v3.yml - IgnoreCommonModelRequestReason: - discriminated: false - union: - - ReasonEnum - - string - source: - openapi: hris_v3.yml - inline: true - IgnoreCommonModelRequest: - properties: - reason: IgnoreCommonModelRequestReason - message: - type: optional - validation: - minLength: 1 - maxLength: 256 - source: - openapi: hris_v3.yml - IndividualCommonModelScopeDeserializer: - properties: - model_name: string - model_permissions: optional> - field_permissions: optional - source: - openapi: hris_v3.yml - IndividualCommonModelScopeDeserializerRequest: - properties: - model_name: - type: string - validation: - minLength: 1 - model_permissions: optional> - field_permissions: optional - source: - openapi: hris_v3.yml - IssueStatus: - discriminated: false - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - union: - - IssueStatusEnum - - string - source: - openapi: hris_v3.yml - inline: true - Issue: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - status: - type: optional - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - error_description: string - end_user: - type: optional> - access: read-only - first_incident_time: optional - last_incident_time: optional - is_muted: - type: optional - access: read-only - error_details: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - IssueStatusEnum: - enum: - - ONGOING - - RESOLVED - docs: |- - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - source: - openapi: hris_v3.yml - LanguageEnum: - enum: - - en - - de - docs: |- - * `en` - en - * `de` - de - source: - openapi: hris_v3.yml - LastSyncResultEnum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - docs: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - source: - openapi: hris_v3.yml - LinkToken: - properties: - link_token: string - integration_name: optional - magic_link_url: optional - source: - openapi: hris_v3.yml - LinkedAccountStatus: - properties: - linked_account_status: string - can_make_request: boolean - source: - openapi: hris_v3.yml - LocationCountry: - discriminated: false - docs: |- - The location's country. - - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - union: - - CountryEnum - - string - source: - openapi: hris_v3.yml - inline: true - LocationLocationType: - discriminated: false - docs: |- - The location's type. Can be either WORK or HOME - - * `HOME` - HOME - * `WORK` - WORK - union: - - LocationTypeEnum - - string - source: - openapi: hris_v3.yml - inline: true - Location: - docs: >- - # The Location Object - - ### Description - - The `Location` object is used to represent an address that can be - associated with an employee. - - - ### Usage Example - - Fetch from the `LIST Locations` endpoint and filter by `ID` to show all - office locations. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The location's name. - phone_number: - type: optional - docs: The location's phone number. - street_1: - type: optional - docs: Line 1 of the location's street address. - street_2: - type: optional - docs: Line 2 of the location's street address. - city: - type: optional - docs: The location's city. - state: - type: optional - docs: The location's state. Represents a region if outside of the US. - zip_code: - type: optional - docs: The location's zip code or postal code. - country: - type: optional - docs: |- - The location's country. - - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - location_type: - type: optional - docs: |- - The location's type. Can be either WORK or HOME - - * `HOME` - HOME - * `WORK` - WORK - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - LocationTypeEnum: - enum: - - HOME - - WORK - docs: |- - * `HOME` - HOME - * `WORK` - WORK - source: - openapi: hris_v3.yml - MaritalStatusEnum: - enum: - - SINGLE - - MARRIED_FILING_JOINTLY - - MARRIED_FILING_SEPARATELY - - HEAD_OF_HOUSEHOLD - - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD - docs: >- - * `SINGLE` - SINGLE - - * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY - - * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY - - * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD - - * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD - source: - openapi: hris_v3.yml - MetaResponse: - properties: - request_schema: map - remote_field_classes: optional> - status: optional - has_conditional_params: boolean - has_required_linked_account_params: boolean - source: - openapi: hris_v3.yml - MethodEnum: - enum: - - GET - - OPTIONS - - HEAD - - POST - - PUT - - PATCH - - DELETE - docs: |- - * `GET` - GET - * `OPTIONS` - OPTIONS - * `HEAD` - HEAD - * `POST` - POST - * `PUT` - PUT - * `PATCH` - PATCH - * `DELETE` - DELETE - source: - openapi: hris_v3.yml - ModelOperation: - docs: >- - # The ModelOperation Object - - ### Description - - The `ModelOperation` object is used to represent the operations that are - currently supported for a given model. - - - ### Usage Example - - View what operations are supported for the `Candidate` endpoint. - properties: - model_name: string - available_operations: list - required_post_parameters: list - supported_fields: list - source: - openapi: hris_v3.yml - ModelPermissionDeserializer: - properties: - is_enabled: optional - source: - openapi: hris_v3.yml - ModelPermissionDeserializerRequest: - properties: - is_enabled: optional - source: - openapi: hris_v3.yml - MultipartFormFieldRequest: - docs: >- - # The MultipartFormField Object - - ### Description - - The `MultipartFormField` object is used to represent fields in an HTTP - request using `multipart/form-data`. - - - ### Usage Example - - Create a `MultipartFormField` to define a multipart form entry. - properties: - name: - type: string - docs: The name of the form field - validation: - minLength: 1 - data: - type: string - docs: The data for the form field. - validation: - minLength: 1 - encoding: - type: optional - docs: |- - The encoding of the value of `data`. Defaults to `RAW` if not defined. - - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - file_name: - type: optional - docs: The file name of the form field, if the field is for a file. - validation: - minLength: 1 - content_type: - type: optional - docs: The MIME type of the file, if the field is for a file. - validation: - minLength: 1 - source: - openapi: hris_v3.yml - PaginatedAccountDetailsAndActionsList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedAuditLogEventList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedBankInfoList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedBenefitList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedCompanyList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedDependentList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedEmployeeList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedEmployeePayrollRunList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedEmployerBenefitList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedEmploymentList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedGroupList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedIssueList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedLocationList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedPayGroupList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedPayrollRunList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedSyncStatusList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedTeamList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedTimeOffBalanceList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedTimeOffList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PaginatedTimesheetEntryList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: hris_v3.yml - PayCurrencyEnum: - enum: - - XUA - - AFN - - AFA - - ALL - - ALK - - DZD - - ADP - - AOA - - AOK - - AON - - AOR - - ARA - - ARS - - ARM - - ARP - - ARL - - AMD - - AWG - - AUD - - ATS - - AZN - - AZM - - BSD - - BHD - - BDT - - BBD - - BYN - - BYB - - BYR - - BEF - - BEC - - BEL - - BZD - - BMD - - BTN - - BOB - - BOL - - BOV - - BOP - - BAM - - BAD - - BAN - - BWP - - BRC - - BRZ - - BRE - - BRR - - BRN - - BRB - - BRL - - GBP - - BND - - BGL - - BGN - - BGO - - BGM - - BUK - - BIF - - XPF - - KHR - - CAD - - CVE - - KYD - - XAF - - CLE - - CLP - - CLF - - CNX - - CNY - - CNH - - COP - - COU - - KMF - - CDF - - CRC - - HRD - - HRK - - CUC - - CUP - - CYP - - CZK - - CSK - - DKK - - DJF - - DOP - - NLG - - XCD - - DDM - - ECS - - ECV - - EGP - - GQE - - ERN - - EEK - - ETB - - EUR - - XBA - - XEU - - XBB - - XBC - - XBD - - FKP - - FJD - - FIM - - FRF - - XFO - - XFU - - GMD - - GEK - - GEL - - DEM - - GHS - - GHC - - GIP - - XAU - - GRD - - GTQ - - GWP - - GNF - - GNS - - GYD - - HTG - - HNL - - HKD - - HUF - - IMP - - ISK - - ISJ - - INR - - IDR - - IRR - - IQD - - IEP - - ILS - - ILP - - ILR - - ITL - - JMD - - JPY - - JOD - - KZT - - KES - - KWD - - KGS - - LAK - - LVL - - LVR - - LBP - - LSL - - LRD - - LYD - - LTL - - LTT - - LUL - - LUC - - LUF - - MOP - - MKD - - MKN - - MGA - - MGF - - MWK - - MYR - - MVR - - MVP - - MLF - - MTL - - MTP - - MRU - - MRO - - MUR - - MXV - - MXN - - MXP - - MDC - - MDL - - MCF - - MNT - - MAD - - MAF - - MZE - - MZN - - MZM - - MMK - - NAD - - NPR - - ANG - - TWD - - NZD - - NIO - - NIC - - NGN - - KPW - - NOK - - OMR - - PKR - - XPD - - PAB - - PGK - - PYG - - PEI - - PEN - - PES - - PHP - - XPT - - PLN - - PLZ - - PTE - - GWE - - QAR - - XRE - - RHD - - RON - - ROL - - RUB - - RUR - - RWF - - SVC - - WST - - SAR - - RSD - - CSD - - SCR - - SLL - - XAG - - SGD - - SKK - - SIT - - SBD - - SOS - - ZAR - - ZAL - - KRH - - KRW - - KRO - - SSP - - SUR - - ESP - - ESA - - ESB - - XDR - - LKR - - SHP - - XSU - - SDD - - SDG - - SDP - - SRD - - SRG - - SZL - - SEK - - CHF - - SYP - - STN - - STD - - TVD - - TJR - - TJS - - TZS - - XTS - - THB - - XXX - - TPE - - TOP - - TTD - - TND - - TRY - - TRL - - TMT - - TMM - - USD - - USN - - USS - - UGX - - UGS - - UAH - - UAK - - AED - - UYW - - UYU - - UYP - - UYI - - UZS - - VUV - - VES - - VEB - - VEF - - VND - - VNN - - CHE - - CHW - - XOF - - YDD - - YER - - YUN - - YUD - - YUM - - YUR - - ZWN - - ZRN - - ZRZ - - ZMW - - ZMK - - ZWD - - ZWR - - ZWL - docs: >- - * `XUA` - ADB Unit of Account - - * `AFN` - Afghan Afghani - - * `AFA` - Afghan Afghani (1927–2002) - - * `ALL` - Albanian Lek - - * `ALK` - Albanian Lek (1946–1965) - - * `DZD` - Algerian Dinar - - * `ADP` - Andorran Peseta - - * `AOA` - Angolan Kwanza - - * `AOK` - Angolan Kwanza (1977–1991) - - * `AON` - Angolan New Kwanza (1990–2000) - - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - - * `ARA` - Argentine Austral - - * `ARS` - Argentine Peso - - * `ARM` - Argentine Peso (1881–1970) - - * `ARP` - Argentine Peso (1983–1985) - - * `ARL` - Argentine Peso Ley (1970–1983) - - * `AMD` - Armenian Dram - - * `AWG` - Aruban Florin - - * `AUD` - Australian Dollar - - * `ATS` - Austrian Schilling - - * `AZN` - Azerbaijani Manat - - * `AZM` - Azerbaijani Manat (1993–2006) - - * `BSD` - Bahamian Dollar - - * `BHD` - Bahraini Dinar - - * `BDT` - Bangladeshi Taka - - * `BBD` - Barbadian Dollar - - * `BYN` - Belarusian Ruble - - * `BYB` - Belarusian Ruble (1994–1999) - - * `BYR` - Belarusian Ruble (2000–2016) - - * `BEF` - Belgian Franc - - * `BEC` - Belgian Franc (convertible) - - * `BEL` - Belgian Franc (financial) - - * `BZD` - Belize Dollar - - * `BMD` - Bermudan Dollar - - * `BTN` - Bhutanese Ngultrum - - * `BOB` - Bolivian Boliviano - - * `BOL` - Bolivian Boliviano (1863–1963) - - * `BOV` - Bolivian Mvdol - - * `BOP` - Bolivian Peso - - * `BAM` - Bosnia-Herzegovina Convertible Mark - - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - - * `BWP` - Botswanan Pula - - * `BRC` - Brazilian Cruzado (1986–1989) - - * `BRZ` - Brazilian Cruzeiro (1942–1967) - - * `BRE` - Brazilian Cruzeiro (1990–1993) - - * `BRR` - Brazilian Cruzeiro (1993–1994) - - * `BRN` - Brazilian New Cruzado (1989–1990) - - * `BRB` - Brazilian New Cruzeiro (1967–1986) - - * `BRL` - Brazilian Real - - * `GBP` - British Pound - - * `BND` - Brunei Dollar - - * `BGL` - Bulgarian Hard Lev - - * `BGN` - Bulgarian Lev - - * `BGO` - Bulgarian Lev (1879–1952) - - * `BGM` - Bulgarian Socialist Lev - - * `BUK` - Burmese Kyat - - * `BIF` - Burundian Franc - - * `XPF` - CFP Franc - - * `KHR` - Cambodian Riel - - * `CAD` - Canadian Dollar - - * `CVE` - Cape Verdean Escudo - - * `KYD` - Cayman Islands Dollar - - * `XAF` - Central African CFA Franc - - * `CLE` - Chilean Escudo - - * `CLP` - Chilean Peso - - * `CLF` - Chilean Unit of Account (UF) - - * `CNX` - Chinese People’s Bank Dollar - - * `CNY` - Chinese Yuan - - * `CNH` - Chinese Yuan (offshore) - - * `COP` - Colombian Peso - - * `COU` - Colombian Real Value Unit - - * `KMF` - Comorian Franc - - * `CDF` - Congolese Franc - - * `CRC` - Costa Rican Colón - - * `HRD` - Croatian Dinar - - * `HRK` - Croatian Kuna - - * `CUC` - Cuban Convertible Peso - - * `CUP` - Cuban Peso - - * `CYP` - Cypriot Pound - - * `CZK` - Czech Koruna - - * `CSK` - Czechoslovak Hard Koruna - - * `DKK` - Danish Krone - - * `DJF` - Djiboutian Franc - - * `DOP` - Dominican Peso - - * `NLG` - Dutch Guilder - - * `XCD` - East Caribbean Dollar - - * `DDM` - East German Mark - - * `ECS` - Ecuadorian Sucre - - * `ECV` - Ecuadorian Unit of Constant Value - - * `EGP` - Egyptian Pound - - * `GQE` - Equatorial Guinean Ekwele - - * `ERN` - Eritrean Nakfa - - * `EEK` - Estonian Kroon - - * `ETB` - Ethiopian Birr - - * `EUR` - Euro - - * `XBA` - European Composite Unit - - * `XEU` - European Currency Unit - - * `XBB` - European Monetary Unit - - * `XBC` - European Unit of Account (XBC) - - * `XBD` - European Unit of Account (XBD) - - * `FKP` - Falkland Islands Pound - - * `FJD` - Fijian Dollar - - * `FIM` - Finnish Markka - - * `FRF` - French Franc - - * `XFO` - French Gold Franc - - * `XFU` - French UIC-Franc - - * `GMD` - Gambian Dalasi - - * `GEK` - Georgian Kupon Larit - - * `GEL` - Georgian Lari - - * `DEM` - German Mark - - * `GHS` - Ghanaian Cedi - - * `GHC` - Ghanaian Cedi (1979–2007) - - * `GIP` - Gibraltar Pound - - * `XAU` - Gold - - * `GRD` - Greek Drachma - - * `GTQ` - Guatemalan Quetzal - - * `GWP` - Guinea-Bissau Peso - - * `GNF` - Guinean Franc - - * `GNS` - Guinean Syli - - * `GYD` - Guyanaese Dollar - - * `HTG` - Haitian Gourde - - * `HNL` - Honduran Lempira - - * `HKD` - Hong Kong Dollar - - * `HUF` - Hungarian Forint - - * `IMP` - IMP - - * `ISK` - Icelandic Króna - - * `ISJ` - Icelandic Króna (1918–1981) - - * `INR` - Indian Rupee - - * `IDR` - Indonesian Rupiah - - * `IRR` - Iranian Rial - - * `IQD` - Iraqi Dinar - - * `IEP` - Irish Pound - - * `ILS` - Israeli New Shekel - - * `ILP` - Israeli Pound - - * `ILR` - Israeli Shekel (1980–1985) - - * `ITL` - Italian Lira - - * `JMD` - Jamaican Dollar - - * `JPY` - Japanese Yen - - * `JOD` - Jordanian Dinar - - * `KZT` - Kazakhstani Tenge - - * `KES` - Kenyan Shilling - - * `KWD` - Kuwaiti Dinar - - * `KGS` - Kyrgystani Som - - * `LAK` - Laotian Kip - - * `LVL` - Latvian Lats - - * `LVR` - Latvian Ruble - - * `LBP` - Lebanese Pound - - * `LSL` - Lesotho Loti - - * `LRD` - Liberian Dollar - - * `LYD` - Libyan Dinar - - * `LTL` - Lithuanian Litas - - * `LTT` - Lithuanian Talonas - - * `LUL` - Luxembourg Financial Franc - - * `LUC` - Luxembourgian Convertible Franc - - * `LUF` - Luxembourgian Franc - - * `MOP` - Macanese Pataca - - * `MKD` - Macedonian Denar - - * `MKN` - Macedonian Denar (1992–1993) - - * `MGA` - Malagasy Ariary - - * `MGF` - Malagasy Franc - - * `MWK` - Malawian Kwacha - - * `MYR` - Malaysian Ringgit - - * `MVR` - Maldivian Rufiyaa - - * `MVP` - Maldivian Rupee (1947–1981) - - * `MLF` - Malian Franc - - * `MTL` - Maltese Lira - - * `MTP` - Maltese Pound - - * `MRU` - Mauritanian Ouguiya - - * `MRO` - Mauritanian Ouguiya (1973–2017) - - * `MUR` - Mauritian Rupee - - * `MXV` - Mexican Investment Unit - - * `MXN` - Mexican Peso - - * `MXP` - Mexican Silver Peso (1861–1992) - - * `MDC` - Moldovan Cupon - - * `MDL` - Moldovan Leu - - * `MCF` - Monegasque Franc - - * `MNT` - Mongolian Tugrik - - * `MAD` - Moroccan Dirham - - * `MAF` - Moroccan Franc - - * `MZE` - Mozambican Escudo - - * `MZN` - Mozambican Metical - - * `MZM` - Mozambican Metical (1980–2006) - - * `MMK` - Myanmar Kyat - - * `NAD` - Namibian Dollar - - * `NPR` - Nepalese Rupee - - * `ANG` - Netherlands Antillean Guilder - - * `TWD` - New Taiwan Dollar - - * `NZD` - New Zealand Dollar - - * `NIO` - Nicaraguan Córdoba - - * `NIC` - Nicaraguan Córdoba (1988–1991) - - * `NGN` - Nigerian Naira - - * `KPW` - North Korean Won - - * `NOK` - Norwegian Krone - - * `OMR` - Omani Rial - - * `PKR` - Pakistani Rupee - - * `XPD` - Palladium - - * `PAB` - Panamanian Balboa - - * `PGK` - Papua New Guinean Kina - - * `PYG` - Paraguayan Guarani - - * `PEI` - Peruvian Inti - - * `PEN` - Peruvian Sol - - * `PES` - Peruvian Sol (1863–1965) - - * `PHP` - Philippine Peso - - * `XPT` - Platinum - - * `PLN` - Polish Zloty - - * `PLZ` - Polish Zloty (1950–1995) - - * `PTE` - Portuguese Escudo - - * `GWE` - Portuguese Guinea Escudo - - * `QAR` - Qatari Rial - - * `XRE` - RINET Funds - - * `RHD` - Rhodesian Dollar - - * `RON` - Romanian Leu - - * `ROL` - Romanian Leu (1952–2006) - - * `RUB` - Russian Ruble - - * `RUR` - Russian Ruble (1991–1998) - - * `RWF` - Rwandan Franc - - * `SVC` - Salvadoran Colón - - * `WST` - Samoan Tala - - * `SAR` - Saudi Riyal - - * `RSD` - Serbian Dinar - - * `CSD` - Serbian Dinar (2002–2006) - - * `SCR` - Seychellois Rupee - - * `SLL` - Sierra Leonean Leone - - * `XAG` - Silver - - * `SGD` - Singapore Dollar - - * `SKK` - Slovak Koruna - - * `SIT` - Slovenian Tolar - - * `SBD` - Solomon Islands Dollar - - * `SOS` - Somali Shilling - - * `ZAR` - South African Rand - - * `ZAL` - South African Rand (financial) - - * `KRH` - South Korean Hwan (1953–1962) - - * `KRW` - South Korean Won - - * `KRO` - South Korean Won (1945–1953) - - * `SSP` - South Sudanese Pound - - * `SUR` - Soviet Rouble - - * `ESP` - Spanish Peseta - - * `ESA` - Spanish Peseta (A account) - - * `ESB` - Spanish Peseta (convertible account) - - * `XDR` - Special Drawing Rights - - * `LKR` - Sri Lankan Rupee - - * `SHP` - St. Helena Pound - - * `XSU` - Sucre - - * `SDD` - Sudanese Dinar (1992–2007) - - * `SDG` - Sudanese Pound - - * `SDP` - Sudanese Pound (1957–1998) - - * `SRD` - Surinamese Dollar - - * `SRG` - Surinamese Guilder - - * `SZL` - Swazi Lilangeni - - * `SEK` - Swedish Krona - - * `CHF` - Swiss Franc - - * `SYP` - Syrian Pound - - * `STN` - São Tomé & Príncipe Dobra - - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - - * `TVD` - TVD - - * `TJR` - Tajikistani Ruble - - * `TJS` - Tajikistani Somoni - - * `TZS` - Tanzanian Shilling - - * `XTS` - Testing Currency Code - - * `THB` - Thai Baht - - * `XXX` - The codes assigned for transactions where no currency is - involved - - * `TPE` - Timorese Escudo - - * `TOP` - Tongan Paʻanga - - * `TTD` - Trinidad & Tobago Dollar - - * `TND` - Tunisian Dinar - - * `TRY` - Turkish Lira - - * `TRL` - Turkish Lira (1922–2005) - - * `TMT` - Turkmenistani Manat - - * `TMM` - Turkmenistani Manat (1993–2009) - - * `USD` - US Dollar - - * `USN` - US Dollar (Next day) - - * `USS` - US Dollar (Same day) - - * `UGX` - Ugandan Shilling - - * `UGS` - Ugandan Shilling (1966–1987) - - * `UAH` - Ukrainian Hryvnia - - * `UAK` - Ukrainian Karbovanets - - * `AED` - United Arab Emirates Dirham - - * `UYW` - Uruguayan Nominal Wage Index Unit - - * `UYU` - Uruguayan Peso - - * `UYP` - Uruguayan Peso (1975–1993) - - * `UYI` - Uruguayan Peso (Indexed Units) - - * `UZS` - Uzbekistani Som - - * `VUV` - Vanuatu Vatu - - * `VES` - Venezuelan Bolívar - - * `VEB` - Venezuelan Bolívar (1871–2008) - - * `VEF` - Venezuelan Bolívar (2008–2018) - - * `VND` - Vietnamese Dong - - * `VNN` - Vietnamese Dong (1978–1985) - - * `CHE` - WIR Euro - - * `CHW` - WIR Franc - - * `XOF` - West African CFA Franc - - * `YDD` - Yemeni Dinar - - * `YER` - Yemeni Rial - - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - - * `YUM` - Yugoslavian New Dinar (1994–2002) - - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - - * `ZWN` - ZWN - - * `ZRN` - Zairean New Zaire (1993–1998) - - * `ZRZ` - Zairean Zaire (1971–1993) - - * `ZMW` - Zambian Kwacha - - * `ZMK` - Zambian Kwacha (1968–2012) - - * `ZWD` - Zimbabwean Dollar (1980–2008) - - * `ZWR` - Zimbabwean Dollar (2008) - - * `ZWL` - Zimbabwean Dollar (2009) - source: - openapi: hris_v3.yml - PayFrequencyEnum: - enum: - - WEEKLY - - BIWEEKLY - - MONTHLY - - QUARTERLY - - SEMIANNUALLY - - ANNUALLY - - value: THIRTEEN-MONTHLY - name: ThirteenMonthly - - PRO_RATA - - SEMIMONTHLY - docs: |- - * `WEEKLY` - WEEKLY - * `BIWEEKLY` - BIWEEKLY - * `MONTHLY` - MONTHLY - * `QUARTERLY` - QUARTERLY - * `SEMIANNUALLY` - SEMIANNUALLY - * `ANNUALLY` - ANNUALLY - * `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY - * `PRO_RATA` - PRO_RATA - * `SEMIMONTHLY` - SEMIMONTHLY - source: - openapi: hris_v3.yml - PayGroup: - docs: >- - # The PayGroup Object - - ### Description - - The `PayGroup` object is used to represent a subset of employees that are - put together for payroll processing purposes. - - - ### Usage Example - - Fetch from the `LIST PayGroup` endpoint and filter by `ID` to show all pay - group information. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - pay_group_name: - type: optional - docs: The pay group name. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - PayPeriodEnum: - enum: - - HOUR - - DAY - - WEEK - - EVERY_TWO_WEEKS - - SEMIMONTHLY - - MONTH - - QUARTER - - EVERY_SIX_MONTHS - - YEAR - docs: |- - * `HOUR` - HOUR - * `DAY` - DAY - * `WEEK` - WEEK - * `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS - * `SEMIMONTHLY` - SEMIMONTHLY - * `MONTH` - MONTH - * `QUARTER` - QUARTER - * `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS - * `YEAR` - YEAR - source: - openapi: hris_v3.yml - PayrollRunRunState: - discriminated: false - docs: |- - The state of the payroll run - - * `PAID` - PAID - * `DRAFT` - DRAFT - * `APPROVED` - APPROVED - * `FAILED` - FAILED - * `CLOSED` - CLOSED - union: - - RunStateEnum - - string - source: - openapi: hris_v3.yml - inline: true - PayrollRunRunType: - discriminated: false - docs: |- - The type of the payroll run - - * `REGULAR` - REGULAR - * `OFF_CYCLE` - OFF_CYCLE - * `CORRECTION` - CORRECTION - * `TERMINATION` - TERMINATION - * `SIGN_ON_BONUS` - SIGN_ON_BONUS - union: - - RunTypeEnum - - string - source: - openapi: hris_v3.yml - inline: true - PayrollRun: - docs: >- - # The PayrollRun Object - - ### Description - - The `PayrollRun` object is used to represent a group of pay statements for - a specific pay schedule. - - - ### Usage Example - - Fetch from the `LIST PayrollRuns` endpoint and filter by `ID` to show all - payroll runs. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - run_state: - type: optional - docs: |- - The state of the payroll run - - * `PAID` - PAID - * `DRAFT` - DRAFT - * `APPROVED` - APPROVED - * `FAILED` - FAILED - * `CLOSED` - CLOSED - run_type: - type: optional - docs: |- - The type of the payroll run - - * `REGULAR` - REGULAR - * `OFF_CYCLE` - OFF_CYCLE - * `CORRECTION` - CORRECTION - * `TERMINATION` - TERMINATION - * `SIGN_ON_BONUS` - SIGN_ON_BONUS - start_date: - type: optional - docs: The day and time the payroll run started. - end_date: - type: optional - docs: The day and time the payroll run ended. - check_date: - type: optional - docs: The day and time the payroll run was checked. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - PolicyTypeEnum: - enum: - - VACATION - - SICK - - PERSONAL - - JURY_DUTY - - VOLUNTEER - - BEREAVEMENT - docs: |- - * `VACATION` - VACATION - * `SICK` - SICK - * `PERSONAL` - PERSONAL - * `JURY_DUTY` - JURY_DUTY - * `VOLUNTEER` - VOLUNTEER - * `BEREAVEMENT` - BEREAVEMENT - source: - openapi: hris_v3.yml - ReasonEnum: - enum: - - GENERAL_CUSTOMER_REQUEST - - GDPR - - OTHER - docs: |- - * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST - * `GDPR` - GDPR - * `OTHER` - OTHER - source: - openapi: hris_v3.yml - RelationshipEnum: - enum: - - CHILD - - SPOUSE - - DOMESTIC_PARTNER - docs: |- - * `CHILD` - CHILD - * `SPOUSE` - SPOUSE - * `DOMESTIC_PARTNER` - DOMESTIC_PARTNER - source: - openapi: hris_v3.yml - RemoteData: - docs: >- - # The RemoteData Object - - ### Description - - The `RemoteData` object is used to represent the full data pulled from the - third-party API for an object. - - - ### Usage Example - - TODO - properties: - path: - type: string - docs: The third-party API path that is being called. - data: - type: optional - access: read-only - source: - openapi: hris_v3.yml - RemoteEndpointInfo: - properties: - method: string - url_path: string - field_traversal_path: list - source: - openapi: hris_v3.yml - RemoteFieldApiCoverage: - discriminated: false - union: - - integer - - double - source: - openapi: hris_v3.yml - inline: true - RemoteFieldApi: - properties: - schema: map - remote_key_name: string - remote_endpoint_info: RemoteEndpointInfo - example_values: optional> - advanced_metadata: optional - coverage: - type: optional - access: read-only - source: - openapi: hris_v3.yml - RemoteFieldApiResponse: - properties: - Benefit: optional> - EmployerBenefit: optional> - Company: optional> - EmployeePayrollRun: optional> - Employee: optional> - Employment: optional> - Location: optional> - PayrollRun: optional> - Team: optional> - TimeOff: optional> - TimeOffBalance: optional> - BankInfo: optional> - PayGroup: optional> - Group: optional> - Dependent: optional> - TimesheetEntry: optional> - source: - openapi: hris_v3.yml - RemoteKey: - docs: >- - # The RemoteKey Object - - ### Description - - The `RemoteKey` object is used to represent a request for a new remote - key. - - - ### Usage Example - - Post a `GenerateRemoteKey` to receive a new `RemoteKey`. - properties: - name: string - key: string - source: - openapi: hris_v3.yml - RemoteResponseResponseType: - discriminated: false - union: - - ResponseTypeEnum - - string - source: - openapi: hris_v3.yml - inline: true - RemoteResponse: - docs: >- - # The RemoteResponse Object - - ### Description - - The `RemoteResponse` object is used to represent information returned from - a third-party endpoint. - - - ### Usage Example - - View the `RemoteResponse` returned from your `DataPassthrough`. - properties: - method: string - path: string - status: integer - response: unknown - response_headers: optional> - response_type: optional - headers: optional> - source: - openapi: hris_v3.yml - RequestFormatEnum: - enum: - - JSON - - XML - - MULTIPART - docs: |- - * `JSON` - JSON - * `XML` - XML - * `MULTIPART` - MULTIPART - source: - openapi: hris_v3.yml - RequestTypeEnum: - enum: - - VACATION - - SICK - - PERSONAL - - JURY_DUTY - - VOLUNTEER - - BEREAVEMENT - docs: |- - * `VACATION` - VACATION - * `SICK` - SICK - * `PERSONAL` - PERSONAL - * `JURY_DUTY` - JURY_DUTY - * `VOLUNTEER` - VOLUNTEER - * `BEREAVEMENT` - BEREAVEMENT - source: - openapi: hris_v3.yml - ResponseTypeEnum: - enum: - - JSON - - BASE64_GZIP - docs: |- - * `JSON` - JSON - * `BASE64_GZIP` - BASE64_GZIP - source: - openapi: hris_v3.yml - RoleEnum: - enum: - - ADMIN - - DEVELOPER - - MEMBER - - API - - SYSTEM - - MERGE_TEAM - docs: |- - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - source: - openapi: hris_v3.yml - RunStateEnum: - enum: - - PAID - - DRAFT - - APPROVED - - FAILED - - CLOSED - docs: |- - * `PAID` - PAID - * `DRAFT` - DRAFT - * `APPROVED` - APPROVED - * `FAILED` - FAILED - * `CLOSED` - CLOSED - source: - openapi: hris_v3.yml - RunTypeEnum: - enum: - - REGULAR - - OFF_CYCLE - - CORRECTION - - TERMINATION - - SIGN_ON_BONUS - docs: |- - * `REGULAR` - REGULAR - * `OFF_CYCLE` - OFF_CYCLE - * `CORRECTION` - CORRECTION - * `TERMINATION` - TERMINATION - * `SIGN_ON_BONUS` - SIGN_ON_BONUS - source: - openapi: hris_v3.yml - SelectiveSyncConfigurationsUsageEnum: - enum: - - IN_NEXT_SYNC - - IN_LAST_SYNC - docs: |- - * `IN_NEXT_SYNC` - IN_NEXT_SYNC - * `IN_LAST_SYNC` - IN_LAST_SYNC - source: - openapi: hris_v3.yml - StatusFd5Enum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - docs: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - source: - openapi: hris_v3.yml - SyncStatusLastSyncResult: - discriminated: false - union: - - LastSyncResultEnum - - string - source: - openapi: hris_v3.yml - inline: true - SyncStatusStatus: - discriminated: false - union: - - StatusFd5Enum - - string - source: - openapi: hris_v3.yml - inline: true - SyncStatus: - docs: >- - # The SyncStatus Object - - ### Description - - The `SyncStatus` object is used to represent the syncing state of an - account - - - ### Usage Example - - View the `SyncStatus` for an account to see how recently its models were - synced. - properties: - model_name: string - model_id: string - last_sync_start: optional - next_sync_start: optional - last_sync_result: optional - last_sync_finished: optional - status: SyncStatusStatus - is_initial_sync: boolean - selective_sync_configurations_usage: optional - source: - openapi: hris_v3.yml - Tax: - docs: >- - # The Tax Object - - ### Description - - The `Tax` object is used to represent an array of the tax deductions for a - given employee's payroll run. - - - ### Usage Example - - Fetch from the `LIST Taxes` endpoint and filter by `ID` to show all taxes. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - employee_payroll_run: - type: optional - validation: - format: uuid - name: - type: optional - docs: The tax's name. - amount: - type: optional - docs: The tax amount. - employer_tax: - type: optional - docs: Whether or not the employer is responsible for paying the tax. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - TeamParentTeam: - discriminated: false - docs: The team's parent team. - union: - - type: string - validation: - format: uuid - - Team - source: - openapi: hris_v3.yml - inline: true - Team: - docs: >- - # The Team Object - - ### Description - - The `Team` object is used to represent a subdivision of the company, - usually a department. Each employee will be grouped into one specific - Team. - - - ### Usage Example - - If you're building a way to filter by `Team`, you'd hit the `GET Teams` - endpoint to fetch the `Teams`, and then use the `ID` of the team your user - selects to filter the `GET Employees` endpoint. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The team's name. - parent_team: - type: optional - docs: The team's parent team. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - TimeOffEmployee: - discriminated: false - docs: The employee requesting time off. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: hris_v3.yml - inline: true - TimeOffApprover: - discriminated: false - docs: >- - The Merge ID of the employee with the ability to approve the time off - request. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: hris_v3.yml - inline: true - TimeOffStatus: - discriminated: false - docs: |- - The status of this time off request. - - * `REQUESTED` - REQUESTED - * `APPROVED` - APPROVED - * `DECLINED` - DECLINED - * `CANCELLED` - CANCELLED - * `DELETED` - DELETED - union: - - TimeOffStatusEnum - - string - source: - openapi: hris_v3.yml - inline: true - TimeOffUnits: - discriminated: false - docs: >- - The measurement that the third-party integration uses to count time - requested. - - - * `HOURS` - HOURS - - * `DAYS` - DAYS - union: - - UnitsEnum - - string - source: - openapi: hris_v3.yml - inline: true - TimeOffRequestType: - discriminated: false - docs: |- - The type of time off request. - - * `VACATION` - VACATION - * `SICK` - SICK - * `PERSONAL` - PERSONAL - * `JURY_DUTY` - JURY_DUTY - * `VOLUNTEER` - VOLUNTEER - * `BEREAVEMENT` - BEREAVEMENT - union: - - RequestTypeEnum - - string - source: - openapi: hris_v3.yml - inline: true - TimeOff: - docs: >- - # The TimeOff Object - - ### Description - - The `TimeOff` object is used to represent all employees' Time Off entries. - - - ### Usage Example - - Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all - time off requests. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - employee: - type: optional - docs: The employee requesting time off. - approver: - type: optional - docs: >- - The Merge ID of the employee with the ability to approve the time off - request. - status: - type: optional - docs: |- - The status of this time off request. - - * `REQUESTED` - REQUESTED - * `APPROVED` - APPROVED - * `DECLINED` - DECLINED - * `CANCELLED` - CANCELLED - * `DELETED` - DELETED - employee_note: - type: optional - docs: The employee note for this time off request. - units: - type: optional - docs: >- - The measurement that the third-party integration uses to count time - requested. - - - * `HOURS` - HOURS - - * `DAYS` - DAYS - amount: - type: optional - docs: The time off quantity measured by the prescribed “units”. - request_type: - type: optional - docs: |- - The type of time off request. - - * `VACATION` - VACATION - * `SICK` - SICK - * `PERSONAL` - PERSONAL - * `JURY_DUTY` - JURY_DUTY - * `VOLUNTEER` - VOLUNTEER - * `BEREAVEMENT` - BEREAVEMENT - start_time: - type: optional - docs: The day and time of the start of the time requested off. - end_time: - type: optional - docs: The day and time of the end of the time requested off. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - TimeOffBalanceEmployee: - discriminated: false - docs: The employee the balance belongs to. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: hris_v3.yml - inline: true - TimeOffBalancePolicyType: - discriminated: false - docs: |- - The policy type of this time off balance. - - * `VACATION` - VACATION - * `SICK` - SICK - * `PERSONAL` - PERSONAL - * `JURY_DUTY` - JURY_DUTY - * `VOLUNTEER` - VOLUNTEER - * `BEREAVEMENT` - BEREAVEMENT - union: - - PolicyTypeEnum - - string - source: - openapi: hris_v3.yml - inline: true - TimeOffBalance: - docs: >- - # The TimeOffBalance Object - - ### Description - - The `TimeOffBalance` object is used to represent current balances for an - employee's Time Off plan. - - - ### Usage Example - - Fetch from the `LIST TimeOffBalances` endpoint and filter by `ID` to show - all time off balances. - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - employee: - type: optional - docs: The employee the balance belongs to. - balance: - type: optional - docs: >- - The current remaining PTO balance, measured in hours. For integrations - that return this value in days, Merge multiplies by 8 to calculate - hours. - used: - type: optional - docs: >- - The amount of PTO used in terms of hours. For integrations that return - this value in days, Merge multiplies by 8 to calculate hours. - policy_type: - type: optional - docs: |- - The policy type of this time off balance. - - * `VACATION` - VACATION - * `SICK` - SICK - * `PERSONAL` - PERSONAL - * `JURY_DUTY` - JURY_DUTY - * `VOLUNTEER` - VOLUNTEER - * `BEREAVEMENT` - BEREAVEMENT - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - TimeOffRequestEmployee: - discriminated: false - docs: The employee requesting time off. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: hris_v3.yml - inline: true - TimeOffRequestApprover: - discriminated: false - docs: >- - The Merge ID of the employee with the ability to approve the time off - request. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: hris_v3.yml - inline: true - TimeOffRequestStatus: - discriminated: false - docs: |- - The status of this time off request. - - * `REQUESTED` - REQUESTED - * `APPROVED` - APPROVED - * `DECLINED` - DECLINED - * `CANCELLED` - CANCELLED - * `DELETED` - DELETED - union: - - TimeOffStatusEnum - - string - source: - openapi: hris_v3.yml - inline: true - TimeOffRequestUnits: - discriminated: false - docs: >- - The measurement that the third-party integration uses to count time - requested. - - - * `HOURS` - HOURS - - * `DAYS` - DAYS - union: - - UnitsEnum - - string - source: - openapi: hris_v3.yml - inline: true - TimeOffRequestRequestType: - discriminated: false - docs: |- - The type of time off request. - - * `VACATION` - VACATION - * `SICK` - SICK - * `PERSONAL` - PERSONAL - * `JURY_DUTY` - JURY_DUTY - * `VOLUNTEER` - VOLUNTEER - * `BEREAVEMENT` - BEREAVEMENT - union: - - RequestTypeEnum - - string - source: - openapi: hris_v3.yml - inline: true - TimeOffRequest: - docs: >- - # The TimeOff Object - - ### Description - - The `TimeOff` object is used to represent all employees' Time Off entries. - - - ### Usage Example - - Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all - time off requests. - properties: - employee: - type: optional - docs: The employee requesting time off. - approver: - type: optional - docs: >- - The Merge ID of the employee with the ability to approve the time off - request. - status: - type: optional - docs: |- - The status of this time off request. - - * `REQUESTED` - REQUESTED - * `APPROVED` - APPROVED - * `DECLINED` - DECLINED - * `CANCELLED` - CANCELLED - * `DELETED` - DELETED - employee_note: - type: optional - docs: The employee note for this time off request. - units: - type: optional - docs: >- - The measurement that the third-party integration uses to count time - requested. - - - * `HOURS` - HOURS - - * `DAYS` - DAYS - amount: - type: optional - docs: The time off quantity measured by the prescribed “units”. - request_type: - type: optional - docs: |- - The type of time off request. - - * `VACATION` - VACATION - * `SICK` - SICK - * `PERSONAL` - PERSONAL - * `JURY_DUTY` - JURY_DUTY - * `VOLUNTEER` - VOLUNTEER - * `BEREAVEMENT` - BEREAVEMENT - start_time: - type: optional - docs: The day and time of the start of the time requested off. - end_time: - type: optional - docs: The day and time of the end of the time requested off. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: hris_v3.yml - TimeOffResponse: - properties: - model: TimeOff - warnings: list - errors: list - logs: optional> - source: - openapi: hris_v3.yml - TimeOffStatusEnum: - enum: - - REQUESTED - - APPROVED - - DECLINED - - CANCELLED - - DELETED - docs: |- - * `REQUESTED` - REQUESTED - * `APPROVED` - APPROVED - * `DECLINED` - DECLINED - * `CANCELLED` - CANCELLED - * `DELETED` - DELETED - source: - openapi: hris_v3.yml - TimesheetEntryEmployee: - discriminated: false - docs: The employee the timesheet entry is for. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: hris_v3.yml - inline: true - TimesheetEntry: - docs: >- - # The Timesheet Entry Object - - ### Description - - The `Timesheet Entry` object is used to track coverage for hours worked by - an 'Employee'. - - - - ### Usage Example - - GET and POST Timesheet Entries - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - employee: - type: optional - docs: The employee the timesheet entry is for. - hours_worked: - type: optional - docs: The number of hours logged by the employee. - start_time: - type: optional - docs: The time at which the employee started work. - end_time: - type: optional - docs: The time at which the employee ended work. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: hris_v3.yml - TimesheetEntryRequestEmployee: - discriminated: false - docs: The employee the timesheet entry is for. - union: - - type: string - validation: - format: uuid - - Employee - source: - openapi: hris_v3.yml - inline: true - TimesheetEntryRequest: - docs: >- - # The Timesheet Entry Object - - ### Description - - The `Timesheet Entry` object is used to track coverage for hours worked by - an 'Employee'. - - - - ### Usage Example - - GET and POST Timesheet Entries - properties: - employee: - type: optional - docs: The employee the timesheet entry is for. - hours_worked: - type: optional - docs: The number of hours logged by the employee. - start_time: - type: optional - docs: The time at which the employee started work. - end_time: - type: optional - docs: The time at which the employee ended work. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: hris_v3.yml - TimesheetEntryResponse: - properties: - model: TimesheetEntry - warnings: list - errors: list - logs: optional> - source: - openapi: hris_v3.yml - UnitsEnum: - enum: - - HOURS - - DAYS - docs: |- - * `HOURS` - HOURS - * `DAYS` - DAYS - source: - openapi: hris_v3.yml - ValidationProblemSource: - properties: - pointer: string - source: - openapi: hris_v3.yml - WarningValidationProblem: - properties: - source: optional - title: string - detail: string - problem_type: string - source: - openapi: hris_v3.yml - WebhookReceiver: - properties: - event: string - is_active: boolean - key: optional - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/accountDetails.yml b/.mock/definition/HRIS/accountDetails.yml deleted file mode 100644 index f392c0098..000000000 --- a/.mock/definition/HRIS/accountDetails.yml +++ /dev/null @@ -1,38 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /hris/v1/account-details - method: GET - auth: - - tokenAuth: [] - docs: Get details for a linked account. - source: - openapi: hris_v3.yml - response: - docs: '' - type: hrisRoot.AccountDetails - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - integration: BambooHR - integration_slug: bamboohr - category: hris - end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - end_user_organization_name: Waystar Royco - end_user_email_address: kendall.roy@waystar-royco.com - status: COMPLETE - webhook_listener_url: >- - https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: true - account_type: PRODUCTION - completed_at: '2024-08-26T20:11:19Z' - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/accountToken.yml b/.mock/definition/HRIS/accountToken.yml deleted file mode 100644 index 7f9116bb0..000000000 --- a/.mock/definition/HRIS/accountToken.yml +++ /dev/null @@ -1,47 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /hris/v1/account-token/{public_token} - method: GET - auth: - - tokenAuth: [] - docs: >- - Returns the account token for the end user with the provided public - token. - source: - openapi: hris_v3.yml - path-parameters: - public_token: string - response: - docs: '' - type: hrisRoot.AccountToken - status-code: 200 - examples: - - path-parameters: - public_token: public_token - headers: - X-Account-Token: '[object Object]' - response: - body: - account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB - integration: - name: name - abbreviated_name: abbreviated_name - categories: - - hris - image: image - square_image: square_image - color: color - slug: slug - api_endpoints_to_documentation_urls: - key: value - webhook_setup_guide_url: webhook_setup_guide_url - category_beta_status: - key: value - id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/asyncPassthrough.yml b/.mock/definition/HRIS/asyncPassthrough.yml deleted file mode 100644 index 0b6a9ea34..000000000 --- a/.mock/definition/HRIS/asyncPassthrough.yml +++ /dev/null @@ -1,74 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /hris/v1/async-passthrough - method: POST - auth: - - tokenAuth: [] - docs: >- - Asynchronously pull data from an endpoint not currently supported by - Merge. - source: - openapi: hris_v3.yml - request: - body: hrisRoot.DataPassthroughRequest - content-type: application/json - response: - docs: '' - type: hrisRoot.AsyncPassthroughReciept - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - method: GET - path: /scooters - response: - body: - async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd - retrieve: - path: /hris/v1/async-passthrough/{async_passthrough_receipt_id} - method: GET - auth: - - tokenAuth: [] - docs: Retrieves data from earlier async-passthrough POST request - source: - openapi: hris_v3.yml - path-parameters: - async_passthrough_receipt_id: string - response: - docs: '' - type: AsyncPassthroughRetrieveResponse - status-code: 200 - examples: - - path-parameters: - async_passthrough_receipt_id: async_passthrough_receipt_id - headers: - X-Account-Token: X-Account-Token - response: - body: - method: GET - path: /scooters - status: 200 - response: - key: value - response_headers: - X-Page-Token: value - response_type: JSON - headers: - EXTRA-HEADER: value - Authorization: - source: - openapi: hris_v3.yml -types: - AsyncPassthroughRetrieveResponse: - discriminated: false - union: - - hrisRoot.RemoteResponse - - string - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/auditTrail.yml b/.mock/definition/HRIS/auditTrail.yml deleted file mode 100644 index 49c27548e..000000000 --- a/.mock/definition/HRIS/auditTrail.yml +++ /dev/null @@ -1,107 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/audit-trail - method: GET - auth: - - tokenAuth: [] - docs: Gets a list of audit trail events. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: AuditTrailListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - end_date: - type: optional - docs: >- - If included, will only include audit trail events that occurred - before this time - event_type: - type: optional - docs: >- - If included, will only include events with the given event type. - Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, - `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, - `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, - `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, - `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, - `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, - `CREATED_DESTINATION`, `DELETED_DESTINATION`, - `CHANGED_DESTINATION`, `CHANGED_SCOPES`, - `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, - `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, - `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, - `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, - `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, - `END_USER_CREDENTIALS_ACCESSED` - page_size: - type: optional - docs: Number of results to return per page. - start_date: - type: optional - docs: >- - If included, will only include audit trail events that occurred - after this time - user_email: - type: optional - docs: >- - If provided, this will return events associated with the specified - user email. Please note that the email address reflects the user's - email at the time of the event, and may not be their current - email. - response: - docs: '' - type: hrisRoot.PaginatedAuditLogEventList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_date: end_date - event_type: event_type - page_size: 1 - start_date: start_date - user_email: user_email - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: b5ceea2a-7171-47ce-8090-165cfce5572c - user_name: Gil Feig - user_email: hello@merge.dev - role: ADMIN - ip_address: 192.0.2.123 - event_type: CREATED_REMOTE_PRODUCTION_API_KEY - event_description: >- - Organization-wide Scopes for model hris.Employee updated - from Read to Read+Write - created_at: '2024-01-15T09:30:00Z' - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/availableActions.yml b/.mock/definition/HRIS/availableActions.yml deleted file mode 100644 index 0d065d20d..000000000 --- a/.mock/definition/HRIS/availableActions.yml +++ /dev/null @@ -1,52 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /hris/v1/available-actions - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of models and actions available for an account. - source: - openapi: hris_v3.yml - response: - docs: '' - type: hrisRoot.AvailableActions - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - integration: - name: name - abbreviated_name: abbreviated_name - categories: - - hris - image: image - square_image: square_image - color: color - slug: slug - api_endpoints_to_documentation_urls: - key: value - webhook_setup_guide_url: webhook_setup_guide_url - category_beta_status: - key: value - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/bankInfo.yml b/.mock/definition/HRIS/bankInfo.yml deleted file mode 100644 index 309396796..000000000 --- a/.mock/definition/HRIS/bankInfo.yml +++ /dev/null @@ -1,244 +0,0 @@ -types: - BankInfoListRequestAccountType: - enum: - - CHECKING - - SAVINGS - source: - openapi: hris_v3.yml - BankInfoListRequestOrderBy: - enum: - - value: '-remote_created_at' - name: RemoteCreatedAtDescending - - value: remote_created_at - name: RemoteCreatedAtAscending - source: - openapi: hris_v3.yml -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/bank-info - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `BankInfo` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: BankInfoListRequest - query-parameters: - account_type: - type: optional - docs: >- - If provided, will only return BankInfo's with this account type. - Options: ('SAVINGS', 'CHECKING') - - - * `SAVINGS` - SAVINGS - - * `CHECKING` - CHECKING - bank_name: - type: optional - docs: If provided, will only return BankInfo's with this bank name. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - employee_id: - type: optional - docs: If provided, will only return bank accounts for this employee. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - order_by: - type: optional - docs: >- - Overrides the default ordering for this endpoint. Possible values - include: remote_created_at, -remote_created_at. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: hrisRoot.PaginatedBankInfoList - status-code: 200 - examples: - - query-parameters: - account_type: CHECKING - bank_name: bank_name - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - employee_id: employee_id - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - order_by: '-remote_created_at' - page_size: 1 - remote_fields: account_type - remote_id: remote_id - show_enum_origins: account_type - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: fd1e0fb5-8f92-4ec9-9f32-179cf732867d - remote_id: '123234' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee: employee - account_number: '439291590' - routing_number: '089690059' - bank_name: Chase - account_type: SAVINGS - remote_created_at: '2021-12-06T10:11:26Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /bank-info - data: - - Varies by platform - retrieve: - path: /hris/v1/bank-info/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `BankInfo` object with the given `id`. - source: - openapi: hris_v3.yml - path-parameters: - id: string - request: - name: BankInfoRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: hrisRoot.BankInfo - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: account_type - show_enum_origins: account_type - headers: - X-Account-Token: X-Account-Token - response: - body: - id: fd1e0fb5-8f92-4ec9-9f32-179cf732867d - remote_id: '123234' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee: employee - account_number: '439291590' - routing_number: '089690059' - bank_name: Chase - account_type: SAVINGS - remote_created_at: '2021-12-06T10:11:26Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /bank-info - data: - - Varies by platform - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/benefits.yml b/.mock/definition/HRIS/benefits.yml deleted file mode 100644 index 0d5618f24..000000000 --- a/.mock/definition/HRIS/benefits.yml +++ /dev/null @@ -1,188 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/benefits - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Benefit` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: BenefitsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - employee_id: - type: optional - docs: >- - If provided, will return the benefits associated with the - employee. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: hrisRoot.PaginatedBenefitList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - employee_id: employee_id - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 3fe5ae7a-f1ba-4529-b7af-84e86dc6d232 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee: employee - provider_name: Blue Shield of California - employee_contribution: 23.65 - company_contribution: 150 - start_date: '2020-11-15T00:59:25Z' - end_date: '2021-10-15T00:23:25Z' - remote_was_deleted: true - employer_benefit: 025fjlc6-6000-430a-848e-aafacbadf4fe - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /benefits - data: - - Varies by platform - retrieve: - path: /hris/v1/benefits/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Benefit` object with the given `id`. - source: - openapi: hris_v3.yml - path-parameters: - id: string - request: - name: BenefitsRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: hrisRoot.Benefit - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 3fe5ae7a-f1ba-4529-b7af-84e86dc6d232 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee: employee - provider_name: Blue Shield of California - employee_contribution: 23.65 - company_contribution: 150 - start_date: '2020-11-15T00:59:25Z' - end_date: '2021-10-15T00:23:25Z' - remote_was_deleted: true - employer_benefit: 025fjlc6-6000-430a-848e-aafacbadf4fe - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /benefits - data: - - Varies by platform - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/companies.yml b/.mock/definition/HRIS/companies.yml deleted file mode 100644 index f9025b094..000000000 --- a/.mock/definition/HRIS/companies.yml +++ /dev/null @@ -1,168 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/companies - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Company` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: CompaniesListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: hrisRoot.PaginatedCompanyList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 1b998423-db0a-4037-a4cf-f79c60cb67b3 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - legal_name: Waystar Royco, Inc. - display_name: Waystar Royco - eins: - - 12-3456789 - - 12-3451111 - - 11-0011000 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /companies - data: - - Varies by platform - retrieve: - path: /hris/v1/companies/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Company` object with the given `id`. - source: - openapi: hris_v3.yml - path-parameters: - id: string - request: - name: CompaniesRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: hrisRoot.Company - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 1b998423-db0a-4037-a4cf-f79c60cb67b3 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - legal_name: Waystar Royco, Inc. - display_name: Waystar Royco - eins: - - 12-3456789 - - 12-3451111 - - 11-0011000 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /companies - data: - - Varies by platform - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/deleteAccount.yml b/.mock/definition/HRIS/deleteAccount.yml deleted file mode 100644 index 796d1449f..000000000 --- a/.mock/definition/HRIS/deleteAccount.yml +++ /dev/null @@ -1,17 +0,0 @@ -service: - auth: false - base-path: '' - endpoints: - delete: - path: /hris/v1/delete-account - method: POST - auth: - - tokenAuth: [] - docs: Delete a linked account. - source: - openapi: hris_v3.yml - examples: - - headers: - X-Account-Token: X-Account-Token - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/dependents.yml b/.mock/definition/HRIS/dependents.yml deleted file mode 100644 index bdae82935..000000000 --- a/.mock/definition/HRIS/dependents.yml +++ /dev/null @@ -1,190 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/dependents - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Dependent` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: DependentsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_sensitive_fields: - type: optional - docs: >- - Whether to include sensitive fields (such as social security - numbers) in the response. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: hrisRoot.PaginatedDependentList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_sensitive_fields: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 025fjlc6-6000-430a-848e-aafacbadf4fe - remote_id: '19202940' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - first_name: Greg - middle_name: A - last_name: Hirsch - relationship: CHILD - employee: 0958cbc6-6040-430a-848e-aafacbadf4ae - date_of_birth: '1990-11-10T00:00:00Z' - gender: MALE - phone_number: '+1234567890' - home_location: d2f972d0-2526-434b-9409-4c3b468e08f0 - is_student: true - ssn: '1234567890' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /dependent - data: - - Varies by platform - retrieve: - path: /hris/v1/dependents/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Dependent` object with the given `id`. - source: - openapi: hris_v3.yml - path-parameters: - id: string - request: - name: DependentsRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_sensitive_fields: - type: optional - docs: >- - Whether to include sensitive fields (such as social security - numbers) in the response. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: hrisRoot.Dependent - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_sensitive_fields: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 025fjlc6-6000-430a-848e-aafacbadf4fe - remote_id: '19202940' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - first_name: Greg - middle_name: A - last_name: Hirsch - relationship: CHILD - employee: 0958cbc6-6040-430a-848e-aafacbadf4ae - date_of_birth: '1990-11-10T00:00:00Z' - gender: MALE - phone_number: '+1234567890' - home_location: d2f972d0-2526-434b-9409-4c3b468e08f0 - is_student: true - ssn: '1234567890' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /dependent - data: - - Varies by platform - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/employeePayrollRuns.yml b/.mock/definition/HRIS/employeePayrollRuns.yml deleted file mode 100644 index e16eb5651..000000000 --- a/.mock/definition/HRIS/employeePayrollRuns.yml +++ /dev/null @@ -1,327 +0,0 @@ -types: - EmployeePayrollRunsListRequestExpandItem: - enum: - - employee - - payroll_run - source: - openapi: hris_v3.yml - EmployeePayrollRunsRetrieveRequestExpandItem: - enum: - - employee - - payroll_run - source: - openapi: hris_v3.yml -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/employee-payroll-runs - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `EmployeePayrollRun` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: EmployeePayrollRunsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - employee_id: - type: optional - docs: >- - If provided, will only return employee payroll runs for this - employee. - ended_after: - type: optional - docs: >- - If provided, will only return employee payroll runs ended after - this datetime. - ended_before: - type: optional - docs: >- - If provided, will only return employee payroll runs ended before - this datetime. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - payroll_run_id: - type: optional - docs: >- - If provided, will only return employee payroll runs for this - employee. - remote_id: - type: optional - docs: The API provider's ID for the given object. - started_after: - type: optional - docs: >- - If provided, will only return employee payroll runs started after - this datetime. - started_before: - type: optional - docs: >- - If provided, will only return employee payroll runs started before - this datetime. - response: - docs: '' - type: hrisRoot.PaginatedEmployeePayrollRunList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - employee_id: employee_id - ended_after: '2024-01-15T09:30:00Z' - ended_before: '2024-01-15T09:30:00Z' - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - payroll_run_id: payroll_run_id - remote_id: remote_id - started_after: '2024-01-15T09:30:00Z' - started_before: '2024-01-15T09:30:00Z' - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee: employee - payroll_run: payroll_run - gross_pay: 1342.67 - net_pay: 865.78 - start_date: '2020-11-08T00:00:00Z' - end_date: '2020-11-09T00:00:00Z' - check_date: '2020-11-10T00:00:00Z' - earnings: - - id: babbced6-3a81-4775-8da2-490dc6385259 - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 - amount: 1002.34 - type: SALARY - - id: babbced6-3a81-4775-8da2-490dc6385259 - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 - amount: 8342.34 - type: OVERTIME - deductions: - - id: 5fd439fc-1b64-4755-b275-64918936c365 - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 - name: Social Security - employee_deduction: 34.54 - company_deduction: 78.78 - taxes: - - id: e3a825fd-c38d-4095-a717-df98c4cb9ebc - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 - name: California State Income Tax - amount: 100.25 - employer_tax: true - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /employee-payroll - data: - - Varies by platform - retrieve: - path: /hris/v1/employee-payroll-runs/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `EmployeePayrollRun` object with the given `id`. - source: - openapi: hris_v3.yml - path-parameters: - id: string - request: - name: EmployeePayrollRunsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: hrisRoot.EmployeePayrollRun - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee: employee - payroll_run: payroll_run - gross_pay: 1342.67 - net_pay: 865.78 - start_date: '2020-11-08T00:00:00Z' - end_date: '2020-11-09T00:00:00Z' - check_date: '2020-11-10T00:00:00Z' - earnings: - - id: babbced6-3a81-4775-8da2-490dc6385259 - remote_id: '52802' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 - amount: 1002.34 - type: SALARY - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - - id: babbced6-3a81-4775-8da2-490dc6385259 - remote_id: '52802' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 - amount: 8342.34 - type: OVERTIME - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - deductions: - - id: 5fd439fc-1b64-4755-b275-64918936c365 - remote_id: '93478612' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 - name: Social Security - employee_deduction: 34.54 - company_deduction: 78.78 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /payroll-deduction - data: - - Varies by platform - taxes: - - id: e3a825fd-c38d-4095-a717-df98c4cb9ebc - remote_id: '26806834' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 - name: California State Income Tax - amount: 100.25 - employer_tax: true - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /employee-payroll - data: - - Varies by platform - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/employees.yml b/.mock/definition/HRIS/employees.yml deleted file mode 100644 index 545cc55c2..000000000 --- a/.mock/definition/HRIS/employees.yml +++ /dev/null @@ -1,831 +0,0 @@ -types: - EmployeesListRequestEmploymentStatus: - enum: - - ACTIVE - - INACTIVE - - PENDING - source: - openapi: hris_v3.yml - EmployeesListRequestExpandItem: - enum: - - company - - employments - - groups - - home_location - - manager - - pay_group - - team - - work_location - source: - openapi: hris_v3.yml - EmployeesListRequestRemoteFields: - enum: - - employment_status - - value: employment_status,ethnicity - name: EmploymentStatusEthnicity - - value: employment_status,ethnicity,gender - name: EmploymentStatusEthnicityGender - - value: employment_status,ethnicity,gender,marital_status - name: EmploymentStatusEthnicityGenderMaritalStatus - - value: employment_status,ethnicity,marital_status - name: EmploymentStatusEthnicityMaritalStatus - - value: employment_status,gender - name: EmploymentStatusGender - - value: employment_status,gender,marital_status - name: EmploymentStatusGenderMaritalStatus - - value: employment_status,marital_status - name: EmploymentStatusMaritalStatus - - ethnicity - - value: ethnicity,gender - name: EthnicityGender - - value: ethnicity,gender,marital_status - name: EthnicityGenderMaritalStatus - - value: ethnicity,marital_status - name: EthnicityMaritalStatus - - gender - - value: gender,marital_status - name: GenderMaritalStatus - - marital_status - source: - openapi: hris_v3.yml - EmployeesListRequestShowEnumOrigins: - enum: - - employment_status - - value: employment_status,ethnicity - name: EmploymentStatusEthnicity - - value: employment_status,ethnicity,gender - name: EmploymentStatusEthnicityGender - - value: employment_status,ethnicity,gender,marital_status - name: EmploymentStatusEthnicityGenderMaritalStatus - - value: employment_status,ethnicity,marital_status - name: EmploymentStatusEthnicityMaritalStatus - - value: employment_status,gender - name: EmploymentStatusGender - - value: employment_status,gender,marital_status - name: EmploymentStatusGenderMaritalStatus - - value: employment_status,marital_status - name: EmploymentStatusMaritalStatus - - ethnicity - - value: ethnicity,gender - name: EthnicityGender - - value: ethnicity,gender,marital_status - name: EthnicityGenderMaritalStatus - - value: ethnicity,marital_status - name: EthnicityMaritalStatus - - gender - - value: gender,marital_status - name: GenderMaritalStatus - - marital_status - source: - openapi: hris_v3.yml - EmployeesRetrieveRequestExpandItem: - enum: - - company - - employments - - groups - - home_location - - manager - - pay_group - - team - - work_location - source: - openapi: hris_v3.yml - EmployeesRetrieveRequestRemoteFields: - enum: - - employment_status - - value: employment_status,ethnicity - name: EmploymentStatusEthnicity - - value: employment_status,ethnicity,gender - name: EmploymentStatusEthnicityGender - - value: employment_status,ethnicity,gender,marital_status - name: EmploymentStatusEthnicityGenderMaritalStatus - - value: employment_status,ethnicity,marital_status - name: EmploymentStatusEthnicityMaritalStatus - - value: employment_status,gender - name: EmploymentStatusGender - - value: employment_status,gender,marital_status - name: EmploymentStatusGenderMaritalStatus - - value: employment_status,marital_status - name: EmploymentStatusMaritalStatus - - ethnicity - - value: ethnicity,gender - name: EthnicityGender - - value: ethnicity,gender,marital_status - name: EthnicityGenderMaritalStatus - - value: ethnicity,marital_status - name: EthnicityMaritalStatus - - gender - - value: gender,marital_status - name: GenderMaritalStatus - - marital_status - source: - openapi: hris_v3.yml - EmployeesRetrieveRequestShowEnumOrigins: - enum: - - employment_status - - value: employment_status,ethnicity - name: EmploymentStatusEthnicity - - value: employment_status,ethnicity,gender - name: EmploymentStatusEthnicityGender - - value: employment_status,ethnicity,gender,marital_status - name: EmploymentStatusEthnicityGenderMaritalStatus - - value: employment_status,ethnicity,marital_status - name: EmploymentStatusEthnicityMaritalStatus - - value: employment_status,gender - name: EmploymentStatusGender - - value: employment_status,gender,marital_status - name: EmploymentStatusGenderMaritalStatus - - value: employment_status,marital_status - name: EmploymentStatusMaritalStatus - - ethnicity - - value: ethnicity,gender - name: EthnicityGender - - value: ethnicity,gender,marital_status - name: EthnicityGenderMaritalStatus - - value: ethnicity,marital_status - name: EthnicityMaritalStatus - - gender - - value: gender,marital_status - name: GenderMaritalStatus - - marital_status - source: - openapi: hris_v3.yml -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/employees - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Employee` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: EmployeesListRequest - query-parameters: - company_id: - type: optional - docs: If provided, will only return employees for this company. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - display_full_name: - type: optional - docs: If provided, will only return employees with this display name. - employment_status: - type: optional - docs: >- - If provided, will only return employees with this employment - status. - - - * `ACTIVE` - ACTIVE - - * `PENDING` - PENDING - - * `INACTIVE` - INACTIVE - employment_type: - type: optional - docs: >- - If provided, will only return employees that have an employment of - the specified employment_type. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - first_name: - type: optional - docs: If provided, will only return employees with this first name. - groups: - type: optional - docs: >- - If provided, will only return employees matching the group ids; - multiple groups can be separated by commas. - home_location_id: - type: optional - docs: If provided, will only return employees for this home location. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_sensitive_fields: - type: optional - docs: >- - Whether to include sensitive fields (such as social security - numbers) in the response. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - job_title: - type: optional - docs: >- - If provided, will only return employees that have an employment of - the specified job_title. - last_name: - type: optional - docs: If provided, will only return employees with this last name. - manager_id: - type: optional - docs: If provided, will only return employees for this manager. - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - pay_group_id: - type: optional - docs: If provided, will only return employees for this pay group - personal_email: - type: optional - docs: If provided, will only return Employees with this personal email - validation: - format: email - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - started_after: - type: optional - docs: >- - If provided, will only return employees that started after this - datetime. - started_before: - type: optional - docs: >- - If provided, will only return employees that started before this - datetime. - team_id: - type: optional - docs: If provided, will only return employees for this team. - terminated_after: - type: optional - docs: >- - If provided, will only return employees that were terminated after - this datetime. - terminated_before: - type: optional - docs: >- - If provided, will only return employees that were terminated - before this datetime. - work_email: - type: optional - docs: If provided, will only return Employees with this work email - validation: - format: email - work_location_id: - type: optional - docs: If provided, will only return employees for this location. - response: - docs: '' - type: hrisRoot.PaginatedEmployeeList - status-code: 200 - examples: - - query-parameters: - company_id: company_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - display_full_name: display_full_name - employment_status: ACTIVE - employment_type: employment_type - first_name: first_name - groups: groups - home_location_id: home_location_id - include_deleted_data: true - include_remote_data: true - include_sensitive_fields: true - include_shell_data: true - job_title: job_title - last_name: last_name - manager_id: manager_id - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - pay_group_id: pay_group_id - personal_email: personal_email - remote_fields: employment_status - remote_id: remote_id - show_enum_origins: employment_status - started_after: '2024-01-15T09:30:00Z' - started_before: '2024-01-15T09:30:00Z' - team_id: team_id - terminated_after: '2024-01-15T09:30:00Z' - terminated_before: '2024-01-15T09:30:00Z' - work_email: work_email - work_location_id: work_location_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee_number: '2' - company: company - first_name: Greg - last_name: Hirsch - preferred_name: Greg the egg - display_full_name: Cousin Greg Hirsch - username: cousingreg - groups: - - 21a54124-397f-494d-985e-3c5b330b8a68 - work_email: greg@merge.dev - personal_email: greg@gmail.com - mobile_phone_number: '+1234567890' - employments: - - 17a54124-287f-494d-965e-3c5b330c9a68 - home_location: home_location - work_location: work_location - manager: manager - pay_group: pay_group - ssn: '1234567890' - gender: MALE - ethnicity: AMERICAN_INDIAN_OR_ALASKA_NATIVE - marital_status: SINGLE - date_of_birth: '1990-11-10T00:00:00Z' - start_date: '2020-10-11T00:00:00Z' - remote_created_at: '2020-10-11T00:00:00Z' - employment_status: ACTIVE - termination_date: '2021-10-12T00:00:00Z' - avatar: http://alturl.com/h2h8m - custom_fields: - key: value - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /people - data: - - Varies by platform - create: - path: /hris/v1/employees - method: POST - auth: - - tokenAuth: [] - docs: Creates an `Employee` object with the given values. - source: - openapi: hris_v3.yml - request: - name: EmployeeEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: hrisRoot.EmployeeRequest - content-type: application/json - response: - docs: '' - type: hrisRoot.EmployeeResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee_number: '2' - company: company - first_name: Greg - last_name: Hirsch - preferred_name: Greg the egg - display_full_name: Cousin Greg Hirsch - username: cousingreg - groups: - - 21a54124-397f-494d-985e-3c5b330b8a68 - work_email: greg@merge.dev - personal_email: greg@gmail.com - mobile_phone_number: '+1234567890' - employments: - - 17a54124-287f-494d-965e-3c5b330c9a68 - home_location: home_location - work_location: work_location - manager: manager - pay_group: pay_group - ssn: '1234567890' - gender: MALE - ethnicity: AMERICAN_INDIAN_OR_ALASKA_NATIVE - marital_status: SINGLE - date_of_birth: '1990-11-10T00:00:00Z' - start_date: '2020-10-11T00:00:00Z' - remote_created_at: '2020-10-11T00:00:00Z' - employment_status: ACTIVE - termination_date: '2021-10-12T00:00:00Z' - avatar: http://alturl.com/h2h8m - custom_fields: - key: value - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /people - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /hris/v1/employees/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Employee` object with the given `id`. - source: - openapi: hris_v3.yml - path-parameters: - id: string - request: - name: EmployeesRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_sensitive_fields: - type: optional - docs: >- - Whether to include sensitive fields (such as social security - numbers) in the response. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: hrisRoot.Employee - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_sensitive_fields: true - include_shell_data: true - remote_fields: employment_status - show_enum_origins: employment_status - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee_number: '2' - company: company - first_name: Greg - last_name: Hirsch - preferred_name: Greg the egg - display_full_name: Cousin Greg Hirsch - username: cousingreg - groups: - - 21a54124-397f-494d-985e-3c5b330b8a68 - work_email: greg@merge.dev - personal_email: greg@gmail.com - mobile_phone_number: '+1234567890' - employments: - - 17a54124-287f-494d-965e-3c5b330c9a68 - home_location: home_location - work_location: work_location - manager: manager - pay_group: pay_group - ssn: '1234567890' - gender: MALE - ethnicity: AMERICAN_INDIAN_OR_ALASKA_NATIVE - marital_status: SINGLE - date_of_birth: '1990-11-10T00:00:00Z' - start_date: '2020-10-11T00:00:00Z' - remote_created_at: '2020-10-11T00:00:00Z' - employment_status: ACTIVE - termination_date: '2021-10-12T00:00:00Z' - avatar: http://alturl.com/h2h8m - custom_fields: - key: value - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /people - data: - - Varies by platform - ignoreCreate: - path: /hris/v1/employees/ignore/{model_id} - method: POST - auth: - - tokenAuth: [] - docs: >- - Ignores a specific row based on the `model_id` in the url. These records - will have their properties set to null, and will not be updated in - future syncs. The "reason" and "message" fields in the request body will - be stored for audit purposes. - source: - openapi: hris_v3.yml - path-parameters: - model_id: string - request: - body: hrisRoot.IgnoreCommonModelRequest - content-type: application/json - examples: - - path-parameters: - model_id: model_id - headers: - X-Account-Token: X-Account-Token - request: - reason: GENERAL_CUSTOMER_REQUEST - metaPostRetrieve: - path: /hris/v1/employees/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Employee` POSTs. - source: - openapi: hris_v3.yml - response: - docs: '' - type: hrisRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/employerBenefits.yml b/.mock/definition/HRIS/employerBenefits.yml deleted file mode 100644 index db54627de..000000000 --- a/.mock/definition/HRIS/employerBenefits.yml +++ /dev/null @@ -1,162 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/employer-benefits - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `EmployerBenefit` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: EmployerBenefitsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: hrisRoot.PaginatedEmployerBenefitList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 025fjlc6-6000-430a-848e-aafacbadf4fele - remote_id: '19202939' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - benefit_plan_type: MEDICAL - name: Kaiser Permanente Medical Plan - description: HDHP Silver Plan - deduction_code: COL - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - retrieve: - path: /hris/v1/employer-benefits/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `EmployerBenefit` object with the given `id`. - source: - openapi: hris_v3.yml - path-parameters: - id: string - request: - name: EmployerBenefitsRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: hrisRoot.EmployerBenefit - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 025fjlc6-6000-430a-848e-aafacbadf4fele - remote_id: '19202939' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - benefit_plan_type: MEDICAL - name: Kaiser Permanente Medical Plan - description: HDHP Silver Plan - deduction_code: COL - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - data: - key: value - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/employments.yml b/.mock/definition/HRIS/employments.yml deleted file mode 100644 index 4fdd65f29..000000000 --- a/.mock/definition/HRIS/employments.yml +++ /dev/null @@ -1,363 +0,0 @@ -types: - EmploymentsListRequestExpandItem: - enum: - - employee - - pay_group - source: - openapi: hris_v3.yml - EmploymentsListRequestOrderBy: - enum: - - value: '-effective_date' - name: EffectiveDateDescending - - value: effective_date - name: EffectiveDateAscending - source: - openapi: hris_v3.yml - EmploymentsListRequestRemoteFields: - enum: - - employment_type - - value: employment_type,flsa_status - name: EmploymentTypeFlsaStatus - - value: employment_type,flsa_status,pay_frequency - name: EmploymentTypeFlsaStatusPayFrequency - - value: employment_type,flsa_status,pay_frequency,pay_period - name: EmploymentTypeFlsaStatusPayFrequencyPayPeriod - - value: employment_type,flsa_status,pay_period - name: EmploymentTypeFlsaStatusPayPeriod - - value: employment_type,pay_frequency - name: EmploymentTypePayFrequency - - value: employment_type,pay_frequency,pay_period - name: EmploymentTypePayFrequencyPayPeriod - - value: employment_type,pay_period - name: EmploymentTypePayPeriod - - flsa_status - - value: flsa_status,pay_frequency - name: FlsaStatusPayFrequency - - value: flsa_status,pay_frequency,pay_period - name: FlsaStatusPayFrequencyPayPeriod - - value: flsa_status,pay_period - name: FlsaStatusPayPeriod - - pay_frequency - - value: pay_frequency,pay_period - name: PayFrequencyPayPeriod - - pay_period - source: - openapi: hris_v3.yml - EmploymentsListRequestShowEnumOrigins: - enum: - - employment_type - - value: employment_type,flsa_status - name: EmploymentTypeFlsaStatus - - value: employment_type,flsa_status,pay_frequency - name: EmploymentTypeFlsaStatusPayFrequency - - value: employment_type,flsa_status,pay_frequency,pay_period - name: EmploymentTypeFlsaStatusPayFrequencyPayPeriod - - value: employment_type,flsa_status,pay_period - name: EmploymentTypeFlsaStatusPayPeriod - - value: employment_type,pay_frequency - name: EmploymentTypePayFrequency - - value: employment_type,pay_frequency,pay_period - name: EmploymentTypePayFrequencyPayPeriod - - value: employment_type,pay_period - name: EmploymentTypePayPeriod - - flsa_status - - value: flsa_status,pay_frequency - name: FlsaStatusPayFrequency - - value: flsa_status,pay_frequency,pay_period - name: FlsaStatusPayFrequencyPayPeriod - - value: flsa_status,pay_period - name: FlsaStatusPayPeriod - - pay_frequency - - value: pay_frequency,pay_period - name: PayFrequencyPayPeriod - - pay_period - source: - openapi: hris_v3.yml - EmploymentsRetrieveRequestExpandItem: - enum: - - employee - - pay_group - source: - openapi: hris_v3.yml - EmploymentsRetrieveRequestRemoteFields: - enum: - - employment_type - - value: employment_type,flsa_status - name: EmploymentTypeFlsaStatus - - value: employment_type,flsa_status,pay_frequency - name: EmploymentTypeFlsaStatusPayFrequency - - value: employment_type,flsa_status,pay_frequency,pay_period - name: EmploymentTypeFlsaStatusPayFrequencyPayPeriod - - value: employment_type,flsa_status,pay_period - name: EmploymentTypeFlsaStatusPayPeriod - - value: employment_type,pay_frequency - name: EmploymentTypePayFrequency - - value: employment_type,pay_frequency,pay_period - name: EmploymentTypePayFrequencyPayPeriod - - value: employment_type,pay_period - name: EmploymentTypePayPeriod - - flsa_status - - value: flsa_status,pay_frequency - name: FlsaStatusPayFrequency - - value: flsa_status,pay_frequency,pay_period - name: FlsaStatusPayFrequencyPayPeriod - - value: flsa_status,pay_period - name: FlsaStatusPayPeriod - - pay_frequency - - value: pay_frequency,pay_period - name: PayFrequencyPayPeriod - - pay_period - source: - openapi: hris_v3.yml - EmploymentsRetrieveRequestShowEnumOrigins: - enum: - - employment_type - - value: employment_type,flsa_status - name: EmploymentTypeFlsaStatus - - value: employment_type,flsa_status,pay_frequency - name: EmploymentTypeFlsaStatusPayFrequency - - value: employment_type,flsa_status,pay_frequency,pay_period - name: EmploymentTypeFlsaStatusPayFrequencyPayPeriod - - value: employment_type,flsa_status,pay_period - name: EmploymentTypeFlsaStatusPayPeriod - - value: employment_type,pay_frequency - name: EmploymentTypePayFrequency - - value: employment_type,pay_frequency,pay_period - name: EmploymentTypePayFrequencyPayPeriod - - value: employment_type,pay_period - name: EmploymentTypePayPeriod - - flsa_status - - value: flsa_status,pay_frequency - name: FlsaStatusPayFrequency - - value: flsa_status,pay_frequency,pay_period - name: FlsaStatusPayFrequencyPayPeriod - - value: flsa_status,pay_period - name: FlsaStatusPayPeriod - - pay_frequency - - value: pay_frequency,pay_period - name: PayFrequencyPayPeriod - - pay_period - source: - openapi: hris_v3.yml -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/employments - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Employment` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: EmploymentsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - employee_id: - type: optional - docs: If provided, will only return employments for this employee. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - order_by: - type: optional - docs: >- - Overrides the default ordering for this endpoint. Possible values - include: effective_date, -effective_date. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: hrisRoot.PaginatedEmploymentList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - employee_id: employee_id - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - order_by: '-effective_date' - page_size: 1 - remote_fields: employment_type - remote_id: remote_id - show_enum_origins: employment_type - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee: employee - job_title: Executive Assistant to Tom Wambsgans - pay_rate: 1.1 - pay_period: HOUR - pay_frequency: WEEKLY - pay_currency: XUA - pay_group: pay_group - flsa_status: EXEMPT - effective_date: '2023-10-06T18:42:34Z' - employment_type: FULL_TIME - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /jobs - data: - - Varies by platform - retrieve: - path: /hris/v1/employments/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Employment` object with the given `id`. - source: - openapi: hris_v3.yml - path-parameters: - id: string - request: - name: EmploymentsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: hrisRoot.Employment - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: employment_type - show_enum_origins: employment_type - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee: employee - job_title: Executive Assistant to Tom Wambsgans - pay_rate: 1.1 - pay_period: HOUR - pay_frequency: WEEKLY - pay_currency: XUA - pay_group: pay_group - flsa_status: EXEMPT - effective_date: '2023-10-06T18:42:34Z' - employment_type: FULL_TIME - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /jobs - data: - - Varies by platform - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/fieldMapping.yml b/.mock/definition/HRIS/fieldMapping.yml deleted file mode 100644 index 995d6404c..000000000 --- a/.mock/definition/HRIS/fieldMapping.yml +++ /dev/null @@ -1,911 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - field_mappings_retrieve: - path: /hris/v1/field-mappings - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all Field Mappings for this Linked Account. Field Mappings are - mappings between third-party Remote Fields and user defined Merge - fields. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - source: - openapi: hris_v3.yml - request: - name: FieldMappingsRetrieveRequest - query-parameters: - exclude_remote_field_metadata: - type: optional - docs: >- - If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and - `remote_fields.schema` will be null). This will increase the speed - of the request since these fields require some calculations. - response: - docs: '' - type: hrisRoot.FieldMappingApiInstanceResponse - status-code: 200 - examples: - - query-parameters: - exclude_remote_field_metadata: true - headers: - X-Account-Token: X-Account-Token - response: - body: - Benefit: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - EmployerBenefit: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Company: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - EmployeePayrollRun: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Employee: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Employment: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Location: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - PayrollRun: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Team: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - TimeOff: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - TimeOffBalance: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - BankInfo: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - PayGroup: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Group: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Dependent: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - TimesheetEntry: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - field_mappings_create: - path: /hris/v1/field-mappings - method: POST - auth: - - tokenAuth: [] - docs: >- - Create new Field Mappings that will be available after the next - scheduled sync. This will cause the next sync for this Linked Account to - sync **ALL** data from start. - source: - openapi: hris_v3.yml - request: - name: CreateFieldMappingRequest - query-parameters: - exclude_remote_field_metadata: - type: optional - docs: >- - If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and - `remote_fields.schema` will be null). This will increase the speed - of the request since these fields require some calculations. - body: - properties: - target_field_name: - type: string - docs: >- - The name of the target field you want this remote field to map - to. - validation: - minLength: 1 - target_field_description: - type: string - docs: >- - The description of the target field you want this remote field - to map to. - validation: - minLength: 1 - remote_field_traversal_path: - docs: >- - The field traversal path of the remote field listed when you hit - the GET /remote-fields endpoint. - type: list - remote_method: - type: string - docs: >- - The method of the remote endpoint where the remote field is - coming from. - validation: - minLength: 1 - remote_url_path: - type: string - docs: >- - The path of the remote endpoint where the remote field is coming - from. - validation: - minLength: 1 - common_model_name: - type: string - docs: >- - The name of the Common Model that the remote field corresponds - to in a given category. - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: hrisRoot.FieldMappingInstanceResponse - status-code: 201 - examples: - - query-parameters: - exclude_remote_field_metadata: true - headers: - X-Account-Token: X-Account-Token - request: - target_field_name: example_target_field_name - target_field_description: this is a example description of the target field - remote_field_traversal_path: - - example_remote_field - remote_method: GET - remote_url_path: /example-url-path - common_model_name: ExampleCommonModel - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - field_mappings_destroy: - path: /hris/v1/field-mappings/{field_mapping_id} - method: DELETE - auth: - - tokenAuth: [] - docs: >- - Deletes Field Mappings for a Linked Account. All data related to this - Field Mapping will be deleted and these changes will be reflected after - the next scheduled sync. This will cause the next sync for this Linked - Account to sync **ALL** data from start. - source: - openapi: hris_v3.yml - path-parameters: - field_mapping_id: string - response: - docs: '' - type: hrisRoot.FieldMappingInstanceResponse - status-code: 204 - examples: - - path-parameters: - field_mapping_id: field_mapping_id - headers: - X-Account-Token: X-Account-Token - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - field_mappings_partial_update: - path: /hris/v1/field-mappings/{field_mapping_id} - method: PATCH - auth: - - tokenAuth: [] - docs: >- - Create or update existing Field Mappings for a Linked Account. Changes - will be reflected after the next scheduled sync. This will cause the - next sync for this Linked Account to sync **ALL** data from start. - source: - openapi: hris_v3.yml - path-parameters: - field_mapping_id: string - request: - name: PatchedEditFieldMappingRequest - body: - properties: - remote_field_traversal_path: - type: optional> - docs: >- - The field traversal path of the remote field listed when you hit - the GET /remote-fields endpoint. - remote_method: - type: optional - docs: >- - The method of the remote endpoint where the remote field is - coming from. - validation: - minLength: 1 - remote_url_path: - type: optional - docs: >- - The path of the remote endpoint where the remote field is coming - from. - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: hrisRoot.FieldMappingInstanceResponse - status-code: 200 - examples: - - path-parameters: - field_mapping_id: field_mapping_id - headers: - X-Account-Token: X-Account-Token - request: {} - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - remote_fields_retrieve: - path: /hris/v1/remote-fields - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all remote fields for a Linked Account. Remote fields are - third-party fields that are accessible after initial sync if remote_data - is enabled. You can use remote fields to override existing Merge fields - or map a new Merge field. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - source: - openapi: hris_v3.yml - request: - name: RemoteFieldsRetrieveRequest - query-parameters: - common_models: - type: optional - docs: >- - A comma seperated list of Common Model names. If included, will - only return Remote Fields for those Common Models. - include_example_values: - type: optional - docs: >- - If true, will include example values, where available, for remote - fields in the 3rd party platform. These examples come from active - data from your customers. - response: - docs: '' - type: hrisRoot.RemoteFieldApiResponse - status-code: 200 - examples: - - query-parameters: - common_models: common_models - include_example_values: include_example_values - headers: - X-Account-Token: X-Account-Token - response: - body: - Benefit: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - EmployerBenefit: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Company: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - EmployeePayrollRun: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Employee: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Employment: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Location: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - PayrollRun: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Team: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - TimeOff: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - TimeOffBalance: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - BankInfo: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - PayGroup: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Group: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Dependent: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - TimesheetEntry: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - target_fields_retrieve: - path: /hris/v1/target-fields - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all organization-wide Target Fields, this will not include any - Linked Account specific Target Fields. Organization-wide Target Fields - are additional fields appended to the Merge Common Model for all Linked - Accounts in a category. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). - source: - openapi: hris_v3.yml - response: - docs: '' - type: hrisRoot.ExternalTargetFieldApiResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - Benefit: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - EmployerBenefit: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Company: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - EmployeePayrollRun: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Employee: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Employment: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Location: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - PayrollRun: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Team: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - TimeOff: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - TimeOffBalance: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - BankInfo: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - PayGroup: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Group: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Dependent: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - TimesheetEntry: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/forceResync.yml b/.mock/definition/HRIS/forceResync.yml deleted file mode 100644 index bd0a3857e..000000000 --- a/.mock/definition/HRIS/forceResync.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - sync_status_resync_create: - path: /hris/v1/sync-status/resync - method: POST - auth: - - tokenAuth: [] - docs: >- - Force re-sync of all models. This endpoint is available for monthly, - quarterly, and highest sync frequency customers on the Professional or - Enterprise plans. Doing so will consume a sync credit for the relevant - linked account. Force re-syncs can also be triggered manually in the - Merge Dashboard and is available for all customers. - source: - openapi: hris_v3.yml - response: - docs: '' - type: list - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - - model_name: Employee - model_id: hris.Employee - last_sync_start: '2021-03-30T19:44:18Z' - next_sync_start: '2021-03-30T20:44:18Z' - last_sync_result: SYNCING - last_sync_finished: '2021-03-30T19:55:18Z' - status: SYNCING - is_initial_sync: true - selective_sync_configurations_usage: IN_NEXT_SYNC - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/generateKey.yml b/.mock/definition/HRIS/generateKey.yml deleted file mode 100644 index 8cb621dbf..000000000 --- a/.mock/definition/HRIS/generateKey.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /hris/v1/generate-key - method: POST - auth: - - tokenAuth: [] - docs: Create a remote key. - source: - openapi: hris_v3.yml - request: - name: GenerateRemoteKeyRequest - body: - properties: - name: - type: string - docs: The name of the remote key - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: hrisRoot.RemoteKey - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - name: Remote Deployment Key 1 - response: - body: - name: Remote Deployment Key 1 - key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/groups.yml b/.mock/definition/HRIS/groups.yml deleted file mode 100644 index 9693030f0..000000000 --- a/.mock/definition/HRIS/groups.yml +++ /dev/null @@ -1,208 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/groups - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Group` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: GroupsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_commonly_used_as_team: - type: optional - docs: >- - If provided, specifies whether to return only Group objects which - refer to a team in the third party platform. Note that this is an - opinionated view based on how a team may be represented in the - third party platform. - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - names: - type: optional - docs: >- - If provided, will only return groups with these names. Multiple - values can be separated by commas. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - types: - type: optional - docs: >- - If provided, will only return groups of these types. Multiple - values can be separated by commas. - response: - docs: '' - type: hrisRoot.PaginatedGroupList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - is_commonly_used_as_team: is_commonly_used_as_team - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - names: names - page_size: 1 - remote_fields: type - remote_id: remote_id - show_enum_origins: type - types: types - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 134e0111-0f67-44f6-98f0-597000290bb3 - remote_id: '800293' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - parent_group: 2ef51b11-2c4e-4b02-8d1d-50592d9e96ef - name: COST_CENTER_US - type: TEAM - is_commonly_used_as_team: true - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /group - data: - - Varies by platform - retrieve: - path: /hris/v1/groups/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Group` object with the given `id`. - source: - openapi: hris_v3.yml - path-parameters: - id: string - request: - name: GroupsRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: hrisRoot.Group - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: type - show_enum_origins: type - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 134e0111-0f67-44f6-98f0-597000290bb3 - remote_id: '800293' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - parent_group: 2ef51b11-2c4e-4b02-8d1d-50592d9e96ef - name: COST_CENTER_US - type: TEAM - is_commonly_used_as_team: true - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /group - data: - - Varies by platform - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/issues.yml b/.mock/definition/HRIS/issues.yml deleted file mode 100644 index fb74883d4..000000000 --- a/.mock/definition/HRIS/issues.yml +++ /dev/null @@ -1,154 +0,0 @@ -types: - IssuesListRequestStatus: - enum: - - ONGOING - - RESOLVED - source: - openapi: hris_v3.yml -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/issues - method: GET - auth: - - tokenAuth: [] - docs: Gets all issues for Organization. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: IssuesListRequest - query-parameters: - account_token: optional - cursor: - type: optional - docs: The pagination cursor value. - end_date: - type: optional - docs: >- - If included, will only include issues whose most recent action - occurred before this time - end_user_organization_name: optional - first_incident_time_after: - type: optional - docs: >- - If provided, will only return issues whose first incident time was - after this datetime. - first_incident_time_before: - type: optional - docs: >- - If provided, will only return issues whose first incident time was - before this datetime. - include_muted: - type: optional - docs: If true, will include muted issues - integration_name: optional - last_incident_time_after: - type: optional - docs: >- - If provided, will only return issues whose last incident time was - after this datetime. - last_incident_time_before: - type: optional - docs: >- - If provided, will only return issues whose last incident time was - before this datetime. - linked_account_id: - type: optional - docs: >- - If provided, will only include issues pertaining to the linked - account passed in. - page_size: - type: optional - docs: Number of results to return per page. - start_date: - type: optional - docs: >- - If included, will only include issues whose most recent action - occurred after this time - status: - type: optional - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - response: - docs: '' - type: hrisRoot.PaginatedIssueList - status-code: 200 - examples: - - query-parameters: - account_token: account_token - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_date: end_date - end_user_organization_name: end_user_organization_name - first_incident_time_after: '2024-01-15T09:30:00Z' - first_incident_time_before: '2024-01-15T09:30:00Z' - include_muted: include_muted - integration_name: integration_name - last_incident_time_after: '2024-01-15T09:30:00Z' - last_incident_time_before: '2024-01-15T09:30:00Z' - linked_account_id: linked_account_id - page_size: 1 - start_date: start_date - status: ONGOING - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: ONGOING - error_description: Missing Permissions - end_user: - key: value - first_incident_time: '2022-12-05T16:19:15Z' - last_incident_time: '2022-12-05T16:19:15Z' - is_muted: true - error_details: - - Missing employee permissions. - - Missing time off permissions. - retrieve: - path: /hris/v1/issues/{id} - method: GET - auth: - - tokenAuth: [] - docs: Get a specific issue. - source: - openapi: hris_v3.yml - path-parameters: - id: string - response: - docs: '' - type: hrisRoot.Issue - status-code: 200 - examples: - - path-parameters: - id: id - headers: - X-Account-Token: '[object Object]' - response: - body: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: ONGOING - error_description: Missing Permissions - end_user: - key: value - first_incident_time: '2022-12-05T16:19:15Z' - last_incident_time: '2022-12-05T16:19:15Z' - is_muted: true - error_details: - - Missing employee permissions. - - Missing time off permissions. - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/linkToken.yml b/.mock/definition/HRIS/linkToken.yml deleted file mode 100644 index f589adda2..000000000 --- a/.mock/definition/HRIS/linkToken.yml +++ /dev/null @@ -1,155 +0,0 @@ -imports: - hrisRoot: __package__.yml -types: - EndUserDetailsRequestLanguage: - discriminated: false - docs: >- - The following subset of IETF language tags can be used to configure - localization. - - - * `en` - en - - * `de` - de - union: - - hrisRoot.LanguageEnum - - string - source: - openapi: hris_v3.yml - inline: true -service: - auth: false - base-path: '' - endpoints: - create: - path: /hris/v1/link-token - method: POST - auth: - - tokenAuth: [] - docs: Creates a link token to be used when linking a new end user. - source: - openapi: hris_v3.yml - request: - name: EndUserDetailsRequest - body: - properties: - end_user_email_address: - type: string - docs: >- - Your end user's email address. This is purely for identification - purposes - setting this value will not cause any emails to be - sent. - validation: - minLength: 1 - maxLength: 100 - end_user_organization_name: - type: string - docs: Your end user's organization. - validation: - minLength: 1 - maxLength: 100 - end_user_origin_id: - type: string - docs: >- - This unique identifier typically represents the ID for your end - user in your product's database. This value must be distinct - from other Linked Accounts' unique identifiers. - validation: - minLength: 1 - maxLength: 100 - categories: - docs: The integration categories to show in Merge Link. - type: list - integration: - type: optional - docs: >- - The slug of a specific pre-selected integration for this linking - flow token. For examples of slugs, see - https://docs.merge.dev/guides/merge-link/single-integration/. - validation: - minLength: 1 - link_expiry_mins: - type: optional - docs: >- - An integer number of minutes between [30, 720 or 10080 if for a - Magic Link URL] for how long this token is valid. Defaults to - 30. - default: 30 - validation: - min: 30 - max: 10080 - should_create_magic_link_url: - type: optional - docs: >- - Whether to generate a Magic Link URL. Defaults to false. For - more information on Magic Link, see - https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - default: false - hide_admin_magic_link: - type: optional - docs: >- - Whether to generate a Magic Link URL on the Admin Needed screen - during the linking flow. Defaults to false. For more information - on Magic Link, see - https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - default: false - common_models: - type: optional> - docs: >- - An array of objects to specify the models and fields that will - be disabled for a given Linked Account. Each object uses - model_id, enabled_actions, and disabled_fields to specify the - model, method, and fields that are scoped for a given Linked - Account. - category_common_model_scopes: - type: >- - optional>>> - docs: >- - When creating a Link Token, you can set permissions for Common - Models that will apply to the account that is going to be - linked. Any model or field not specified in link token payload - will default to existing settings. - language: - type: optional - docs: >- - The following subset of IETF language tags can be used to - configure localization. - - - * `en` - en - - * `de` - de - are_syncs_disabled: - type: optional - docs: >- - The boolean that indicates whether initial, periodic, and force - syncs will be disabled. - default: false - integration_specific_config: - type: optional> - docs: >- - A JSON object containing integration-specific configuration - options. - content-type: application/json - response: - docs: '' - type: hrisRoot.LinkToken - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - end_user_email_address: example@gmail.com - end_user_organization_name: Test Organization - end_user_origin_id: '12345' - categories: - - hris - - ats - response: - body: - link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 - integration_name: Lever - magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/linkedAccounts.yml b/.mock/definition/HRIS/linkedAccounts.yml deleted file mode 100644 index a5afc183a..000000000 --- a/.mock/definition/HRIS/linkedAccounts.yml +++ /dev/null @@ -1,169 +0,0 @@ -types: - LinkedAccountsListRequestCategory: - enum: - - accounting - - ats - - crm - - filestorage - - hris - - mktg - - ticketing - source: - openapi: hris_v3.yml -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/linked-accounts - method: GET - auth: - - tokenAuth: [] - docs: List linked accounts for your organization. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: LinkedAccountsListRequest - query-parameters: - category: - type: optional - docs: >- - Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, - `mktg`, `ticketing` - - - * `hris` - hris - - * `ats` - ats - - * `accounting` - accounting - - * `ticketing` - ticketing - - * `crm` - crm - - * `mktg` - mktg - - * `filestorage` - filestorage - cursor: - type: optional - docs: The pagination cursor value. - end_user_email_address: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given email address. - end_user_organization_name: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given organization name. - end_user_origin_id: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given origin ID. - end_user_origin_ids: - type: optional - docs: >- - Comma-separated list of EndUser origin IDs, making it possible to - specify multiple EndUsers at once. - id: - type: optional - validation: - format: uuid - ids: - type: optional - docs: >- - Comma-separated list of LinkedAccount IDs, making it possible to - specify multiple LinkedAccounts at once. - include_duplicates: - type: optional - docs: >- - If `true`, will include complete production duplicates of the - account specified by the `id` query parameter in the response. - `id` must be for a complete production linked account. - integration_name: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given integration name. - is_test_account: - type: optional - docs: >- - If included, will only include test linked accounts. If not - included, will only include non-test linked accounts. - page_size: - type: optional - docs: Number of results to return per page. - status: - type: optional - docs: >- - Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, - `RELINK_NEEDED` - response: - docs: '' - type: hrisRoot.PaginatedAccountDetailsAndActionsList - status-code: 200 - examples: - - query-parameters: - category: accounting - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_user_email_address: end_user_email_address - end_user_organization_name: end_user_organization_name - end_user_origin_id: end_user_origin_id - end_user_origin_ids: end_user_origin_ids - id: id - ids: ids - include_duplicates: true - integration_name: integration_name - is_test_account: is_test_account - page_size: 1 - status: status - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: e59b1821-f85c-4e28-a6b3-1804156f3563 - category: hris - status: COMPLETE - status_detail: Invalid login credentials - end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d - end_user_organization_name: Foo Bar, LLC - end_user_email_address: hradmin@foobar.dev - subdomain: foobar - webhook_listener_url: >- - https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: true - integration: - name: name - categories: - - hris - color: color - slug: slug - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - account_type: PRODUCTION - completed_at: '2024-08-26T20:11:19Z' - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/locations.yml b/.mock/definition/HRIS/locations.yml deleted file mode 100644 index 58bafc923..000000000 --- a/.mock/definition/HRIS/locations.yml +++ /dev/null @@ -1,245 +0,0 @@ -types: - LocationsListRequestLocationType: - enum: - - HOME - - WORK - source: - openapi: hris_v3.yml - LocationsListRequestRemoteFields: - enum: - - country - - value: country,location_type - name: CountryLocationType - - location_type - source: - openapi: hris_v3.yml - LocationsListRequestShowEnumOrigins: - enum: - - country - - value: country,location_type - name: CountryLocationType - - location_type - source: - openapi: hris_v3.yml - LocationsRetrieveRequestRemoteFields: - enum: - - country - - value: country,location_type - name: CountryLocationType - - location_type - source: - openapi: hris_v3.yml - LocationsRetrieveRequestShowEnumOrigins: - enum: - - country - - value: country,location_type - name: CountryLocationType - - location_type - source: - openapi: hris_v3.yml -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/locations - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Location` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: LocationsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - location_type: - type: optional - docs: |- - If provided, will only return locations with this location_type - - * `HOME` - HOME - * `WORK` - WORK - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: hrisRoot.PaginatedLocationList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - location_type: HOME - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_fields: country - remote_id: remote_id - show_enum_origins: country - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: f5e6a151-f44e-449a-afb1-8fd781905958 - remote_id: '93018402' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: NYC Office - phone_number: '+1111111111' - street_1: 2920 Broadway - street_2: 2nd Floor - city: 'New York ' - state: NY - zip_code: '10027' - country: AF - location_type: HOME - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /locations - data: - - Varies by platform - retrieve: - path: /hris/v1/locations/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Location` object with the given `id`. - source: - openapi: hris_v3.yml - path-parameters: - id: string - request: - name: LocationsRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: hrisRoot.Location - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: country - show_enum_origins: country - headers: - X-Account-Token: X-Account-Token - response: - body: - id: f5e6a151-f44e-449a-afb1-8fd781905958 - remote_id: '93018402' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: NYC Office - phone_number: '+1111111111' - street_1: 2920 Broadway - street_2: 2nd Floor - city: 'New York ' - state: NY - zip_code: '10027' - country: AF - location_type: HOME - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /locations - data: - - Varies by platform - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/passthrough.yml b/.mock/definition/HRIS/passthrough.yml deleted file mode 100644 index d3e6c8607..000000000 --- a/.mock/definition/HRIS/passthrough.yml +++ /dev/null @@ -1,42 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /hris/v1/passthrough - method: POST - auth: - - tokenAuth: [] - docs: Pull data from an endpoint not currently supported by Merge. - source: - openapi: hris_v3.yml - request: - body: hrisRoot.DataPassthroughRequest - content-type: application/json - response: - docs: '' - type: hrisRoot.RemoteResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - method: GET - path: /scooters - response: - body: - method: GET - path: /scooters - status: 200 - response: - key: value - response_headers: - X-Page-Token: value - response_type: JSON - headers: - EXTRA-HEADER: value - Authorization: - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/payGroups.yml b/.mock/definition/HRIS/payGroups.yml deleted file mode 100644 index 25fa26504..000000000 --- a/.mock/definition/HRIS/payGroups.yml +++ /dev/null @@ -1,158 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/pay-groups - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `PayGroup` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: PayGroupsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: hrisRoot.PaginatedPayGroupList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: fd1e0fb5-8f92-4ec9-9f32-179cf732867d - remote_id: '800293' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - pay_group_name: contractor - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /pay-group - data: - - Varies by platform - retrieve: - path: /hris/v1/pay-groups/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `PayGroup` object with the given `id`. - source: - openapi: hris_v3.yml - path-parameters: - id: string - request: - name: PayGroupsRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: hrisRoot.PayGroup - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: fd1e0fb5-8f92-4ec9-9f32-179cf732867d - remote_id: '800293' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - pay_group_name: contractor - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /pay-group - data: - - Varies by platform - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/payrollRuns.yml b/.mock/definition/HRIS/payrollRuns.yml deleted file mode 100644 index 2ee23ce83..000000000 --- a/.mock/definition/HRIS/payrollRuns.yml +++ /dev/null @@ -1,274 +0,0 @@ -types: - PayrollRunsListRequestRemoteFields: - enum: - - run_state - - value: run_state,run_type - name: RunStateRunType - - run_type - source: - openapi: hris_v3.yml - PayrollRunsListRequestRunType: - enum: - - CORRECTION - - OFF_CYCLE - - REGULAR - - SIGN_ON_BONUS - - TERMINATION - source: - openapi: hris_v3.yml - PayrollRunsListRequestShowEnumOrigins: - enum: - - run_state - - value: run_state,run_type - name: RunStateRunType - - run_type - source: - openapi: hris_v3.yml - PayrollRunsRetrieveRequestRemoteFields: - enum: - - run_state - - value: run_state,run_type - name: RunStateRunType - - run_type - source: - openapi: hris_v3.yml - PayrollRunsRetrieveRequestShowEnumOrigins: - enum: - - run_state - - value: run_state,run_type - name: RunStateRunType - - run_type - source: - openapi: hris_v3.yml -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/payroll-runs - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `PayrollRun` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: PayrollRunsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - ended_after: - type: optional - docs: >- - If provided, will only return payroll runs ended after this - datetime. - ended_before: - type: optional - docs: >- - If provided, will only return payroll runs ended before this - datetime. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - run_type: - type: optional - docs: >- - If provided, will only return PayrollRun's with this status. - Options: ('REGULAR', 'OFF_CYCLE', 'CORRECTION', 'TERMINATION', - 'SIGN_ON_BONUS') - - - * `REGULAR` - REGULAR - - * `OFF_CYCLE` - OFF_CYCLE - - * `CORRECTION` - CORRECTION - - * `TERMINATION` - TERMINATION - - * `SIGN_ON_BONUS` - SIGN_ON_BONUS - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - started_after: - type: optional - docs: >- - If provided, will only return payroll runs started after this - datetime. - started_before: - type: optional - docs: >- - If provided, will only return payroll runs started before this - datetime. - response: - docs: '' - type: hrisRoot.PaginatedPayrollRunList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - ended_after: '2024-01-15T09:30:00Z' - ended_before: '2024-01-15T09:30:00Z' - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_fields: run_state - remote_id: remote_id - run_type: CORRECTION - show_enum_origins: run_state - started_after: '2024-01-15T09:30:00Z' - started_before: '2024-01-15T09:30:00Z' - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 37336947-b3d4-4a4c-a310-ab6ab510e079 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - run_state: PAID - run_type: REGULAR - start_date: '2020-11-08T00:00:00Z' - end_date: '2020-11-15T00:00:00Z' - check_date: '2020-11-15T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /payroll - data: - - Varies by platform - retrieve: - path: /hris/v1/payroll-runs/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `PayrollRun` object with the given `id`. - source: - openapi: hris_v3.yml - path-parameters: - id: string - request: - name: PayrollRunsRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: hrisRoot.PayrollRun - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: run_state - show_enum_origins: run_state - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 37336947-b3d4-4a4c-a310-ab6ab510e079 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - run_state: PAID - run_type: REGULAR - start_date: '2020-11-08T00:00:00Z' - end_date: '2020-11-15T00:00:00Z' - check_date: '2020-11-15T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /payroll - data: - - Varies by platform - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/regenerateKey.yml b/.mock/definition/HRIS/regenerateKey.yml deleted file mode 100644 index 041f97c44..000000000 --- a/.mock/definition/HRIS/regenerateKey.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /hris/v1/regenerate-key - method: POST - auth: - - tokenAuth: [] - docs: Exchange remote keys. - source: - openapi: hris_v3.yml - request: - name: RemoteKeyForRegenerationRequest - body: - properties: - name: - type: string - docs: The name of the remote key - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: hrisRoot.RemoteKey - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - name: Remote Deployment Key 1 - response: - body: - name: Remote Deployment Key 1 - key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/scopes.yml b/.mock/definition/HRIS/scopes.yml deleted file mode 100644 index 24139c3f3..000000000 --- a/.mock/definition/HRIS/scopes.yml +++ /dev/null @@ -1,167 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - default_scopes_retrieve: - path: /hris/v1/default-scopes - method: GET - auth: - - tokenAuth: [] - docs: >- - Get the default permissions for Merge Common Models and fields across - all Linked Accounts of a given category. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - source: - openapi: hris_v3.yml - response: - docs: '' - type: hrisRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - linked_account_scopes_retrieve: - path: /hris/v1/linked-account-scopes - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all available permissions for Merge Common Models and fields for a - single Linked Account. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - source: - openapi: hris_v3.yml - response: - docs: '' - type: hrisRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - linked_account_scopes_create: - path: /hris/v1/linked-account-scopes - method: POST - auth: - - tokenAuth: [] - docs: >- - Update permissions for any Common Model or field for a single Linked - Account. Any Scopes not set in this POST request will inherit the - default Scopes. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) - source: - openapi: hris_v3.yml - request: - name: LinkedAccountCommonModelScopeDeserializerRequest - body: - properties: - common_models: - docs: The common models you want to update the scopes for - type: list - content-type: application/json - response: - docs: '' - type: hrisRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - home_location - disabled_fields: - - work_location - - model_name: Benefit - model_permissions: - WRITE: - is_enabled: false - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/syncStatus.yml b/.mock/definition/HRIS/syncStatus.yml deleted file mode 100644 index 8f676be29..000000000 --- a/.mock/definition/HRIS/syncStatus.yml +++ /dev/null @@ -1,64 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/sync-status - method: GET - auth: - - tokenAuth: [] - docs: >- - Get sync status for the current sync and the most recently finished - sync. `last_sync_start` represents the most recent time any sync began. - `last_sync_finished` represents the most recent time any sync completed. - These timestamps may correspond to different sync instances which may - result in a sync start time being later than a separate sync completed - time. To ensure you are retrieving the latest available data reference - the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. - Possible values for `status` and `last_sync_result` are `DISABLED`, - `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more - about sync status in our [Help - Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: SyncStatusListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: hrisRoot.PaginatedSyncStatusList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - model_name: Employee - model_id: hris.Employee - last_sync_start: '2021-03-30T19:44:18Z' - next_sync_start: '2021-03-30T20:44:18Z' - last_sync_result: SYNCING - last_sync_finished: '2021-03-30T19:55:18Z' - status: SYNCING - is_initial_sync: true - selective_sync_configurations_usage: IN_NEXT_SYNC - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/teams.yml b/.mock/definition/HRIS/teams.yml deleted file mode 100644 index fce94aed9..000000000 --- a/.mock/definition/HRIS/teams.yml +++ /dev/null @@ -1,176 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/teams - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Team` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: TeamsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - parent_team_id: - type: optional - docs: If provided, will only return teams with this parent team. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: hrisRoot.PaginatedTeamList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - parent_team_id: parent_team_id - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 13a72919-9fae-4f54-81ca-ddfd8712a1ba - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Engineering - parent_team: parent_team - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /teams - data: - - Varies by platform - retrieve: - path: /hris/v1/teams/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Team` object with the given `id`. - source: - openapi: hris_v3.yml - path-parameters: - id: string - request: - name: TeamsRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: hrisRoot.Team - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 13a72919-9fae-4f54-81ca-ddfd8712a1ba - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Engineering - parent_team: parent_team - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /teams - data: - - Varies by platform - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/timeOff.yml b/.mock/definition/HRIS/timeOff.yml deleted file mode 100644 index 4b024ba98..000000000 --- a/.mock/definition/HRIS/timeOff.yml +++ /dev/null @@ -1,638 +0,0 @@ -types: - TimeOffListRequestExpandItem: - enum: - - approver - - employee - source: - openapi: hris_v3.yml - TimeOffListRequestRemoteFields: - enum: - - request_type - - value: request_type,status - name: RequestTypeStatus - - value: request_type,status,units - name: RequestTypeStatusUnits - - value: request_type,units - name: RequestTypeUnits - - status - - value: status,units - name: StatusUnits - - units - source: - openapi: hris_v3.yml - TimeOffListRequestRequestType: - enum: - - BEREAVEMENT - - JURY_DUTY - - PERSONAL - - SICK - - VACATION - - VOLUNTEER - source: - openapi: hris_v3.yml - TimeOffListRequestShowEnumOrigins: - enum: - - request_type - - value: request_type,status - name: RequestTypeStatus - - value: request_type,status,units - name: RequestTypeStatusUnits - - value: request_type,units - name: RequestTypeUnits - - status - - value: status,units - name: StatusUnits - - units - source: - openapi: hris_v3.yml - TimeOffListRequestStatus: - enum: - - APPROVED - - CANCELLED - - DECLINED - - DELETED - - REQUESTED - source: - openapi: hris_v3.yml - TimeOffRetrieveRequestExpandItem: - enum: - - approver - - employee - source: - openapi: hris_v3.yml - TimeOffRetrieveRequestRemoteFields: - enum: - - request_type - - value: request_type,status - name: RequestTypeStatus - - value: request_type,status,units - name: RequestTypeStatusUnits - - value: request_type,units - name: RequestTypeUnits - - status - - value: status,units - name: StatusUnits - - units - source: - openapi: hris_v3.yml - TimeOffRetrieveRequestShowEnumOrigins: - enum: - - request_type - - value: request_type,status - name: RequestTypeStatus - - value: request_type,status,units - name: RequestTypeStatusUnits - - value: request_type,units - name: RequestTypeUnits - - status - - value: status,units - name: StatusUnits - - units - source: - openapi: hris_v3.yml -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/time-off - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `TimeOff` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: TimeOffListRequest - query-parameters: - approver_id: - type: optional - docs: If provided, will only return time off for this approver. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - employee_id: - type: optional - docs: If provided, will only return time off for this employee. - ended_after: - type: optional - docs: >- - If provided, will only return employees that ended after this - datetime. - ended_before: - type: optional - docs: >- - If provided, will only return time-offs that ended before this - datetime. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - request_type: - type: optional - docs: >- - If provided, will only return TimeOff with this request type. - Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', - 'VOLUNTEER', 'BEREAVEMENT') - - - * `VACATION` - VACATION - - * `SICK` - SICK - - * `PERSONAL` - PERSONAL - - * `JURY_DUTY` - JURY_DUTY - - * `VOLUNTEER` - VOLUNTEER - - * `BEREAVEMENT` - BEREAVEMENT - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - started_after: - type: optional - docs: >- - If provided, will only return time-offs that started after this - datetime. - started_before: - type: optional - docs: >- - If provided, will only return time-offs that started before this - datetime. - status: - type: optional - docs: >- - If provided, will only return TimeOff with this status. Options: - ('REQUESTED', 'APPROVED', 'DECLINED', 'CANCELLED', 'DELETED') - - - * `REQUESTED` - REQUESTED - - * `APPROVED` - APPROVED - - * `DECLINED` - DECLINED - - * `CANCELLED` - CANCELLED - - * `DELETED` - DELETED - response: - docs: '' - type: hrisRoot.PaginatedTimeOffList - status-code: 200 - examples: - - query-parameters: - approver_id: approver_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - employee_id: employee_id - ended_after: '2024-01-15T09:30:00Z' - ended_before: '2024-01-15T09:30:00Z' - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_fields: request_type - remote_id: remote_id - request_type: BEREAVEMENT - show_enum_origins: request_type - started_after: '2024-01-15T09:30:00Z' - started_before: '2024-01-15T09:30:00Z' - status: APPROVED - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 91b2b905-e866-40c8-8be2-efe53827a0aa - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee: employee - approver: approver - status: REQUESTED - employee_note: Moving into the new apartment Kendall Roy gave me! - units: HOURS - amount: 3 - request_type: VACATION - start_time: '2020-11-10T00:00:00Z' - end_time: '2020-11-17T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /leave - data: - - Varies by platform - create: - path: /hris/v1/time-off - method: POST - auth: - - tokenAuth: [] - docs: Creates a `TimeOff` object with the given values. - source: - openapi: hris_v3.yml - request: - name: TimeOffEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: hrisRoot.TimeOffRequest - content-type: application/json - response: - docs: '' - type: hrisRoot.TimeOffResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 91b2b905-e866-40c8-8be2-efe53827a0aa - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee: employee - approver: approver - status: REQUESTED - employee_note: Moving into the new apartment Kendall Roy gave me! - units: HOURS - amount: 3 - request_type: VACATION - start_time: '2020-11-10T00:00:00Z' - end_time: '2020-11-17T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /leave - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /hris/v1/time-off/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `TimeOff` object with the given `id`. - source: - openapi: hris_v3.yml - path-parameters: - id: string - request: - name: TimeOffRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: hrisRoot.TimeOff - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: request_type - show_enum_origins: request_type - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 91b2b905-e866-40c8-8be2-efe53827a0aa - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee: employee - approver: approver - status: REQUESTED - employee_note: Moving into the new apartment Kendall Roy gave me! - units: HOURS - amount: 3 - request_type: VACATION - start_time: '2020-11-10T00:00:00Z' - end_time: '2020-11-17T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /leave - data: - - Varies by platform - metaPostRetrieve: - path: /hris/v1/time-off/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `TimeOff` POSTs. - source: - openapi: hris_v3.yml - response: - docs: '' - type: hrisRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/timeOffBalances.yml b/.mock/definition/HRIS/timeOffBalances.yml deleted file mode 100644 index 0fec21a1c..000000000 --- a/.mock/definition/HRIS/timeOffBalances.yml +++ /dev/null @@ -1,235 +0,0 @@ -types: - TimeOffBalancesListRequestPolicyType: - enum: - - BEREAVEMENT - - JURY_DUTY - - PERSONAL - - SICK - - VACATION - - VOLUNTEER - source: - openapi: hris_v3.yml -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/time-off-balances - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `TimeOffBalance` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: TimeOffBalancesListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - employee_id: - type: optional - docs: If provided, will only return time off balances for this employee. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - policy_type: - type: optional - docs: >- - If provided, will only return TimeOffBalance with this policy - type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', - 'VOLUNTEER', 'BEREAVEMENT') - - - * `VACATION` - VACATION - - * `SICK` - SICK - - * `PERSONAL` - PERSONAL - - * `JURY_DUTY` - JURY_DUTY - - * `VOLUNTEER` - VOLUNTEER - - * `BEREAVEMENT` - BEREAVEMENT - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: hrisRoot.PaginatedTimeOffBalanceList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - employee_id: employee_id - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - policy_type: BEREAVEMENT - remote_fields: policy_type - remote_id: remote_id - show_enum_origins: policy_type - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 91b2b905-e866-40c8-8be2-efe53827a0aa - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee: employee - balance: 1.1 - used: 1.1 - policy_type: VACATION - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /leave - data: - - Varies by platform - retrieve: - path: /hris/v1/time-off-balances/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `TimeOffBalance` object with the given `id`. - source: - openapi: hris_v3.yml - path-parameters: - id: string - request: - name: TimeOffBalancesRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: hrisRoot.TimeOffBalance - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: policy_type - show_enum_origins: policy_type - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 91b2b905-e866-40c8-8be2-efe53827a0aa - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee: employee - balance: 1.1 - used: 1.1 - policy_type: VACATION - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /leave - data: - - Varies by platform - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/timesheetEntries.yml b/.mock/definition/HRIS/timesheetEntries.yml deleted file mode 100644 index 6c7fb8335..000000000 --- a/.mock/definition/HRIS/timesheetEntries.yml +++ /dev/null @@ -1,481 +0,0 @@ -types: - TimesheetEntriesListRequestOrderBy: - enum: - - value: '-start_time' - name: StartTimeDescending - - value: start_time - name: StartTimeAscending - source: - openapi: hris_v3.yml -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/timesheet-entries - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `TimesheetEntry` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: hris_v3.yml - request: - name: TimesheetEntriesListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - employee_id: - type: optional - docs: If provided, will only return timesheet entries for this employee. - ended_after: - type: optional - docs: >- - If provided, will only return timesheet entries ended after this - datetime. - ended_before: - type: optional - docs: >- - If provided, will only return timesheet entries ended before this - datetime. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - order_by: - type: optional - docs: >- - Overrides the default ordering for this endpoint. Possible values - include: start_time, -start_time. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - started_after: - type: optional - docs: >- - If provided, will only return timesheet entries started after this - datetime. - started_before: - type: optional - docs: >- - If provided, will only return timesheet entries started before - this datetime. - response: - docs: '' - type: hrisRoot.PaginatedTimesheetEntryList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - employee_id: employee_id - ended_after: '2024-01-15T09:30:00Z' - ended_before: '2024-01-15T09:30:00Z' - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - order_by: '-start_time' - page_size: 1 - remote_id: remote_id - started_after: '2024-01-15T09:30:00Z' - started_before: '2024-01-15T09:30:00Z' - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 91b2b905-e866-40c8-8be2-efe53827a0aa - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee: employee - hours_worked: 10 - start_time: '2020-11-10T00:00:00Z' - end_time: '2020-11-10T00:10:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /dependent - data: - - Varies by platform - create: - path: /hris/v1/timesheet-entries - method: POST - auth: - - tokenAuth: [] - docs: Creates a `TimesheetEntry` object with the given values. - source: - openapi: hris_v3.yml - request: - name: TimesheetEntryEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: hrisRoot.TimesheetEntryRequest - content-type: application/json - response: - docs: '' - type: hrisRoot.TimesheetEntryResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 91b2b905-e866-40c8-8be2-efe53827a0aa - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee: employee - hours_worked: 10 - start_time: '2020-11-10T00:00:00Z' - end_time: '2020-11-10T00:10:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /dependent - data: - - Varies by platform - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /hris/v1/timesheet-entries/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `TimesheetEntry` object with the given `id`. - source: - openapi: hris_v3.yml - path-parameters: - id: string - request: - name: TimesheetEntriesRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: hrisRoot.TimesheetEntry - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 91b2b905-e866-40c8-8be2-efe53827a0aa - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - employee: employee - hours_worked: 10 - start_time: '2020-11-10T00:00:00Z' - end_time: '2020-11-10T00:10:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /dependent - data: - - Varies by platform - metaPostRetrieve: - path: /hris/v1/timesheet-entries/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `TimesheetEntry` POSTs. - source: - openapi: hris_v3.yml - response: - docs: '' - type: hrisRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/webhookReceivers.yml b/.mock/definition/HRIS/webhookReceivers.yml deleted file mode 100644 index 3bc0cc7d8..000000000 --- a/.mock/definition/HRIS/webhookReceivers.yml +++ /dev/null @@ -1,65 +0,0 @@ -imports: - hrisRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /hris/v1/webhook-receivers - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `WebhookReceiver` objects. - source: - openapi: hris_v3.yml - response: - docs: '' - type: list - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - - event: event - is_active: true - key: key - create: - path: /hris/v1/webhook-receivers - method: POST - auth: - - tokenAuth: [] - docs: Creates a `WebhookReceiver` object with the given values. - source: - openapi: hris_v3.yml - request: - name: WebhookReceiverRequest - body: - properties: - event: - type: string - validation: - minLength: 1 - is_active: boolean - key: - type: optional - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: hrisRoot.WebhookReceiver - status-code: 201 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - event: event - is_active: true - response: - body: - event: event - is_active: true - key: key - source: - openapi: hris_v3.yml diff --git a/.mock/definition/Ticketing/__package__.yml b/.mock/definition/Ticketing/__package__.yml deleted file mode 100644 index 966e73662..000000000 --- a/.mock/definition/Ticketing/__package__.yml +++ /dev/null @@ -1,3405 +0,0 @@ -types: - Account: - docs: >- - # The Account Object - - ### Description - - The `Account` object is used to represent the account that a ticket is - associated with. - - - The account is a company that may be a customer. This does not represent - the company that is receiving the ticket. - - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The account's name. - domains: - type: optional>> - docs: The account's domain names. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ticketing_v3.yml - AccountDetailsCategory: - discriminated: false - union: - - CategoryEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - AccountDetails: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - integration: - type: optional - access: read-only - integration_slug: - type: optional - access: read-only - category: optional - end_user_origin_id: - type: optional - access: read-only - end_user_organization_name: - type: optional - access: read-only - end_user_email_address: - type: optional - validation: - format: email - access: read-only - status: - type: optional - access: read-only - webhook_listener_url: - type: optional - validation: - format: uri - access: read-only - is_duplicate: - type: optional - docs: >- - Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test - Linked Accounts, incomplete Production Linked Accounts, and ignored - duplicate Production Linked Account sets. - access: read-only - account_type: - type: optional - access: read-only - completed_at: - type: optional - docs: The time at which account completes the linking flow. - source: - openapi: ticketing_v3.yml - AccountDetailsAndActionsCategory: - discriminated: false - union: - - CategoryEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - AccountDetailsAndActionsStatus: - discriminated: false - union: - - AccountDetailsAndActionsStatusEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - AccountDetailsAndActions: - docs: >- - # The LinkedAccount Object - - ### Description - - The `LinkedAccount` object is used to represent an end user's link with a - specific integration. - - - ### Usage Example - - View a list of your organization's `LinkedAccount` objects. - properties: - id: string - category: optional - status: AccountDetailsAndActionsStatus - status_detail: optional - end_user_origin_id: optional - end_user_organization_name: string - end_user_email_address: string - subdomain: - type: optional - docs: The tenant or domain the customer has provided access to. - webhook_listener_url: string - is_duplicate: - type: optional - docs: >- - Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test - Linked Accounts, incomplete Production Linked Accounts, and ignored - duplicate Production Linked Account sets. - integration: optional - account_type: string - completed_at: datetime - source: - openapi: ticketing_v3.yml - AccountDetailsAndActionsIntegration: - properties: - name: string - categories: list - image: optional - square_image: optional - color: string - slug: string - passthrough_available: boolean - available_model_operations: optional> - source: - openapi: ticketing_v3.yml - AccountDetailsAndActionsStatusEnum: - enum: - - COMPLETE - - INCOMPLETE - - RELINK_NEEDED - - IDLE - docs: |- - * `COMPLETE` - COMPLETE - * `INCOMPLETE` - INCOMPLETE - * `RELINK_NEEDED` - RELINK_NEEDED - * `IDLE` - IDLE - source: - openapi: ticketing_v3.yml - AccountIntegration: - properties: - name: - type: string - docs: Company name. - abbreviated_name: - type: optional - docs: >- - Optional. This shortened name appears in places with limited space, - usually in conjunction with the platform's logo (e.g., Merge Link - menu).

Example: Workforce Now (in lieu of ADP Workforce - Now), SuccessFactors (in lieu of SAP SuccessFactors) - categories: - type: optional> - docs: >- - Category or categories this integration belongs to. Multiple - categories should be comma separated, i.e. [ats, hris]. - access: read-only - image: - type: optional - docs: Company logo in rectangular shape. - validation: - format: uri - square_image: - type: optional - docs: Company logo in square shape. - validation: - format: uri - color: - type: optional - docs: >- - The color of this integration used for buttons and text throughout the - app and landing pages. Choose a darker, saturated color. - validation: - pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ - maxLength: 18 - slug: - type: optional - access: read-only - api_endpoints_to_documentation_urls: - type: optional> - docs: >- - Mapping of API endpoints to documentation urls for support. Example: - {'GET': [['/common-model-scopes', - 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', - 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], - 'POST': []} - webhook_setup_guide_url: - type: optional - docs: >- - Setup guide URL for third party webhook creation. Exposed in Merge - Docs. - category_beta_status: - type: optional> - docs: Category or categories this integration is in beta status for. - access: read-only - source: - openapi: ticketing_v3.yml - AccountToken: - properties: - account_token: string - integration: AccountIntegration - id: string - source: - openapi: ticketing_v3.yml - AdvancedMetadata: - properties: - id: - type: string - validation: - format: uuid - display_name: optional - description: optional - is_required: optional - is_custom: optional - field_choices: optional> - source: - openapi: ticketing_v3.yml - AsyncPassthroughReciept: - properties: - async_passthrough_receipt_id: - type: string - validation: - format: uuid - source: - openapi: ticketing_v3.yml - AttachmentTicket: - discriminated: false - docs: The ticket associated with the attachment. - union: - - type: string - validation: - format: uuid - - Ticket - source: - openapi: ticketing_v3.yml - inline: true - Attachment: - docs: |- - # The Attachment Object - ### Description - The `Attachment` object is used to represent an attachment for a ticket. - - ### Usage Example - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - file_name: - type: optional - docs: >- - The attachment's name. It is required to include the file extension in - the attachment's name. - ticket: - type: optional - docs: The ticket associated with the attachment. - file_url: - type: optional - docs: >- - The attachment's url. It is required to include the file extension in - the file's URL. - content_type: - type: optional - docs: The attachment's file format. - uploaded_by: - type: optional - docs: The user who uploaded the attachment. - validation: - format: uuid - remote_created_at: - type: optional - docs: When the third party's attachment was created. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ticketing_v3.yml - AttachmentRequestTicket: - discriminated: false - docs: The ticket associated with the attachment. - union: - - type: string - validation: - format: uuid - - Ticket - source: - openapi: ticketing_v3.yml - inline: true - AttachmentRequest: - docs: |- - # The Attachment Object - ### Description - The `Attachment` object is used to represent an attachment for a ticket. - - ### Usage Example - TODO - properties: - file_name: - type: optional - docs: >- - The attachment's name. It is required to include the file extension in - the attachment's name. - ticket: - type: optional - docs: The ticket associated with the attachment. - file_url: - type: optional - docs: >- - The attachment's url. It is required to include the file extension in - the file's URL. - content_type: - type: optional - docs: The attachment's file format. - uploaded_by: - type: optional - docs: The user who uploaded the attachment. - validation: - format: uuid - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: ticketing_v3.yml - AuditLogEventRole: - discriminated: false - docs: >- - Designates the role of the user (or SYSTEM/API if action not taken by a - user) at the time of this Event occurring. - - - * `ADMIN` - ADMIN - - * `DEVELOPER` - DEVELOPER - - * `MEMBER` - MEMBER - - * `API` - API - - * `SYSTEM` - SYSTEM - - * `MERGE_TEAM` - MERGE_TEAM - union: - - RoleEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - AuditLogEventEventType: - discriminated: false - docs: >- - Designates the type of event that occurred. - - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - union: - - EventTypeEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - AuditLogEvent: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - user_name: - type: optional - docs: The User's full name at the time of this Event occurring. - validation: - maxLength: 200 - user_email: - type: optional - docs: The User's email at the time of this Event occurring. - validation: - format: email - maxLength: 254 - role: - type: AuditLogEventRole - docs: >- - Designates the role of the user (or SYSTEM/API if action not taken by - a user) at the time of this Event occurring. - - - * `ADMIN` - ADMIN - - * `DEVELOPER` - DEVELOPER - - * `MEMBER` - MEMBER - - * `API` - API - - * `SYSTEM` - SYSTEM - - * `MERGE_TEAM` - MERGE_TEAM - ip_address: - type: string - validation: - maxLength: 45 - event_type: - type: AuditLogEventEventType - docs: >- - Designates the type of event that occurred. - - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - event_description: string - created_at: - type: optional - access: read-only - source: - openapi: ticketing_v3.yml - AvailableActions: - docs: >- - # The AvailableActions Object - - ### Description - - The `Activity` object is used to see all available model/operation - combinations for an integration. - - - ### Usage Example - - Fetch all the actions available for the `Zenefits` integration. - properties: - integration: AccountIntegration - passthrough_available: boolean - available_model_operations: optional> - source: - openapi: ticketing_v3.yml - CategoriesEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - docs: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - source: - openapi: ticketing_v3.yml - CategoryEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - docs: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - source: - openapi: ticketing_v3.yml - CollectionAccessLevel: - discriminated: false - docs: |- - The level of access a User has to the Collection and its sub-objects. - - * `PRIVATE` - PRIVATE - * `COMPANY` - COMPANY - * `PUBLIC` - PUBLIC - * `PARENT_COLLECTION` - PARENT_COLLECTION - union: - - CollectionAccessLevelEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - CollectionParentCollection: - discriminated: false - docs: The parent collection for this collection. - union: - - type: string - validation: - format: uuid - - Collection - source: - openapi: ticketing_v3.yml - inline: true - Collection: - docs: >- - # The Collection Object - - ### Description - - The `Collection` object is used to represent one or more `Tickets`. There - can be a hierarchy of `Collections`, in which a sub-collection belongs to - a parent-collection. - - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The collection's name. - description: - type: optional - docs: The collection's description. - access_level: - type: optional - docs: |- - The level of access a User has to the Collection and its sub-objects. - - * `PRIVATE` - PRIVATE - * `COMPANY` - COMPANY - * `PUBLIC` - PUBLIC - * `PARENT_COLLECTION` - PARENT_COLLECTION - collection_type: - type: optional - docs: |- - The collection's type. - - * `LIST` - LIST - * `PROJECT` - PROJECT - parent_collection: - type: optional - docs: The parent collection for this collection. - collection_url: - type: optional - docs: The 3rd party url of the Collection. - validation: - format: uri - maxLength: 2000 - remote_created_at: - type: optional - docs: When the third party's collection was created. - remote_updated_at: - type: optional - docs: When the third party's collection was updated. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ticketing_v3.yml - CollectionAccessLevelEnum: - enum: - - PRIVATE - - COMPANY - - PUBLIC - - PARENT_COLLECTION - docs: |- - * `PRIVATE` - PRIVATE - * `COMPANY` - COMPANY - * `PUBLIC` - PUBLIC - * `PARENT_COLLECTION` - PARENT_COLLECTION - source: - openapi: ticketing_v3.yml - CollectionTypeEnum: - enum: - - LIST - - PROJECT - docs: |- - * `LIST` - LIST - * `PROJECT` - PROJECT - source: - openapi: ticketing_v3.yml - CommentUser: - discriminated: false - docs: >- - The author of the Comment, if the author is a User. If the third party - does not support specifying an author, we will append "[Posted on behalf - of {name}]" to the comment. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: ticketing_v3.yml - inline: true - CommentContact: - discriminated: false - docs: >- - The author of the Comment, if the author is a Contact.If the third party - does not support specifying an author, we will append "[Posted on behalf - of {name}]" to the comment. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: ticketing_v3.yml - inline: true - CommentTicket: - discriminated: false - docs: 'The ticket associated with the comment. ' - union: - - type: string - validation: - format: uuid - - Ticket - source: - openapi: ticketing_v3.yml - inline: true - Comment: - docs: |- - # The Comment Object - ### Description - The `Comment` object is used to represent a comment on a ticket. - - ### Usage Example - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - user: - type: optional - docs: >- - The author of the Comment, if the author is a User. If the third party - does not support specifying an author, we will append "[Posted on - behalf of {name}]" to the comment. - contact: - type: optional - docs: >- - The author of the Comment, if the author is a Contact.If the third - party does not support specifying an author, we will append "[Posted - on behalf of {name}]" to the comment. - body: - type: optional - docs: The comment's text body. - html_body: - type: optional - docs: The comment's text body formatted as html. - ticket: - type: optional - docs: 'The ticket associated with the comment. ' - is_private: - type: optional - docs: Whether or not the comment is internal. - remote_created_at: - type: optional - docs: When the third party's comment was created. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ticketing_v3.yml - CommentRequestUser: - discriminated: false - docs: >- - The author of the Comment, if the author is a User. If the third party - does not support specifying an author, we will append "[Posted on behalf - of {name}]" to the comment. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: ticketing_v3.yml - inline: true - CommentRequestContact: - discriminated: false - docs: >- - The author of the Comment, if the author is a Contact.If the third party - does not support specifying an author, we will append "[Posted on behalf - of {name}]" to the comment. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: ticketing_v3.yml - inline: true - CommentRequestTicket: - discriminated: false - docs: 'The ticket associated with the comment. ' - union: - - type: string - validation: - format: uuid - - Ticket - source: - openapi: ticketing_v3.yml - inline: true - CommentRequest: - docs: |- - # The Comment Object - ### Description - The `Comment` object is used to represent a comment on a ticket. - - ### Usage Example - TODO - properties: - user: - type: optional - docs: >- - The author of the Comment, if the author is a User. If the third party - does not support specifying an author, we will append "[Posted on - behalf of {name}]" to the comment. - contact: - type: optional - docs: >- - The author of the Comment, if the author is a Contact.If the third - party does not support specifying an author, we will append "[Posted - on behalf of {name}]" to the comment. - body: - type: optional - docs: The comment's text body. - html_body: - type: optional - docs: The comment's text body formatted as html. - ticket: - type: optional - docs: 'The ticket associated with the comment. ' - is_private: - type: optional - docs: Whether or not the comment is internal. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: ticketing_v3.yml - CommentResponse: - properties: - model: Comment - warnings: list - errors: list - logs: optional> - source: - openapi: ticketing_v3.yml - CommonModelScopeApi: - properties: - common_models: - docs: The common models you want to update the scopes for - type: list - source: - openapi: ticketing_v3.yml - CommonModelScopesBodyRequest: - properties: - model_id: - type: string - validation: - minLength: 1 - enabled_actions: list - disabled_fields: list - source: - openapi: ticketing_v3.yml - ContactAccount: - discriminated: false - docs: The contact's account. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: ticketing_v3.yml - inline: true - Contact: - docs: >- - # The Contact Object - - ### Description - - The `Contact` object is used to represent the customer, lead, or external - user that a ticket is associated with. - - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The contact's name. - email_address: - type: optional - docs: The contact's email address. - phone_number: - type: optional - docs: The contact's phone number. - details: - type: optional - docs: The contact's details. - account: - type: optional - docs: The contact's account. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ticketing_v3.yml - ContactRequestAccount: - discriminated: false - docs: The contact's account. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: ticketing_v3.yml - inline: true - ContactRequest: - docs: >- - # The Contact Object - - ### Description - - The `Contact` object is used to represent the customer, lead, or external - user that a ticket is associated with. - - - ### Usage Example - - TODO - properties: - name: - type: optional - docs: The contact's name. - email_address: - type: optional - docs: The contact's email address. - phone_number: - type: optional - docs: The contact's phone number. - details: - type: optional - docs: The contact's details. - account: - type: optional - docs: The contact's account. - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - source: - openapi: ticketing_v3.yml - DataPassthroughRequest: - docs: >- - # The DataPassthrough Object - - ### Description - - The `DataPassthrough` object is used to send information to an - otherwise-unsupported third-party endpoint. - - - ### Usage Example - - Create a `DataPassthrough` to get team hierarchies from your Rippling - integration. - properties: - method: MethodEnum - path: - type: string - docs: The path of the request in the third party's platform. - validation: - minLength: 1 - base_url_override: - type: optional - docs: An optional override of the third party's base url for the request. - validation: - minLength: 1 - data: - type: optional - docs: >- - The data with the request. You must include a `request_format` - parameter matching the data's format - validation: - minLength: 1 - multipart_form_data: - type: optional> - docs: >- - Pass an array of `MultipartFormField` objects in here instead of using - the `data` param if `request_format` is set to `MULTIPART`. - headers: - type: optional> - docs: >- - The headers to use for the request (Merge will handle the account's - authorization headers). `Content-Type` header is required for - passthrough. Choose content type corresponding to expected format of - receiving server. - request_format: optional - normalize_response: - type: optional - docs: >- - Optional. If true, the response will always be an object of the form - `{"type": T, "value": ...}` where `T` will be one of `string, boolean, - number, null, array, object`. - source: - openapi: ticketing_v3.yml - DebugModeLog: - properties: - log_id: string - dashboard_view: string - log_summary: DebugModelLogSummary - source: - openapi: ticketing_v3.yml - DebugModelLogSummary: - properties: - url: string - method: string - status_code: integer - source: - openapi: ticketing_v3.yml - EnabledActionsEnum: - enum: - - READ - - WRITE - docs: |- - * `READ` - READ - * `WRITE` - WRITE - source: - openapi: ticketing_v3.yml - EncodingEnum: - enum: - - RAW - - BASE64 - - GZIP_BASE64 - docs: |- - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - source: - openapi: ticketing_v3.yml - ErrorValidationProblem: - properties: - source: optional - title: string - detail: string - problem_type: string - source: - openapi: ticketing_v3.yml - EventTypeEnum: - enum: - - CREATED_REMOTE_PRODUCTION_API_KEY - - DELETED_REMOTE_PRODUCTION_API_KEY - - CREATED_TEST_API_KEY - - DELETED_TEST_API_KEY - - REGENERATED_PRODUCTION_API_KEY - - REGENERATED_WEBHOOK_SIGNATURE - - INVITED_USER - - TWO_FACTOR_AUTH_ENABLED - - TWO_FACTOR_AUTH_DISABLED - - DELETED_LINKED_ACCOUNT - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - CREATED_DESTINATION - - DELETED_DESTINATION - - CHANGED_DESTINATION - - CHANGED_SCOPES - - CHANGED_PERSONAL_INFORMATION - - CHANGED_ORGANIZATION_SETTINGS - - ENABLED_INTEGRATION - - DISABLED_INTEGRATION - - ENABLED_CATEGORY - - DISABLED_CATEGORY - - CHANGED_PASSWORD - - RESET_PASSWORD - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - FORCED_LINKED_ACCOUNT_RESYNC - - MUTED_ISSUE - - GENERATED_MAGIC_LINK - - ENABLED_MERGE_WEBHOOK - - DISABLED_MERGE_WEBHOOK - - MERGE_WEBHOOK_TARGET_CHANGED - - END_USER_CREDENTIALS_ACCESSED - docs: >- - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - - * `INVITED_USER` - INVITED_USER - - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - * `CREATED_DESTINATION` - CREATED_DESTINATION - - * `DELETED_DESTINATION` - DELETED_DESTINATION - - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - - * `CHANGED_SCOPES` - CHANGED_SCOPES - - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - - * `RESET_PASSWORD` - RESET_PASSWORD - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - - * `MUTED_ISSUE` - MUTED_ISSUE - - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - source: - openapi: ticketing_v3.yml - ExternalTargetFieldApi: - properties: - name: - type: optional - access: read-only - description: - type: optional - access: read-only - is_mapped: - type: optional - access: read-only - source: - openapi: ticketing_v3.yml - ExternalTargetFieldApiResponse: - properties: - Ticket: optional> - Comment: optional> - Project: optional> - Collection: optional> - User: optional> - Role: optional> - Account: optional> - Team: optional> - Attachment: optional> - Tag: optional> - Contact: optional> - source: - openapi: ticketing_v3.yml - FieldFormatEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - docs: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - source: - openapi: ticketing_v3.yml - FieldMappingApiInstanceTargetField: - properties: - name: string - description: string - is_organization_wide: boolean - source: - openapi: ticketing_v3.yml - inline: true - FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: - properties: - method: optional - url_path: optional - field_traversal_path: optional> - source: - openapi: ticketing_v3.yml - inline: true - FieldMappingApiInstanceRemoteField: - properties: - remote_key_name: optional - schema: optional> - remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - source: - openapi: ticketing_v3.yml - inline: true - FieldMappingApiInstance: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - is_integration_wide: - type: optional - access: read-only - target_field: - type: optional - access: read-only - remote_field: - type: optional - access: read-only - source: - openapi: ticketing_v3.yml - FieldMappingApiInstanceResponse: - properties: - Ticket: optional> - Comment: optional> - Project: optional> - Collection: optional> - User: optional> - Role: optional> - Account: optional> - Team: optional> - Attachment: optional> - Tag: optional> - Contact: optional> - source: - openapi: ticketing_v3.yml - FieldMappingInstanceResponse: - properties: - model: FieldMappingApiInstance - warnings: list - errors: list - logs: optional> - source: - openapi: ticketing_v3.yml - FieldPermissionDeserializer: - properties: - enabled_fields: optional> - disabled_fields: optional> - source: - openapi: ticketing_v3.yml - FieldPermissionDeserializerRequest: - properties: - enabled_fields: optional> - disabled_fields: optional> - source: - openapi: ticketing_v3.yml - FieldTypeEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - docs: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - source: - openapi: ticketing_v3.yml - IndividualCommonModelScopeDeserializer: - properties: - model_name: string - model_permissions: optional> - field_permissions: optional - source: - openapi: ticketing_v3.yml - IndividualCommonModelScopeDeserializerRequest: - properties: - model_name: - type: string - validation: - minLength: 1 - model_permissions: optional> - field_permissions: optional - source: - openapi: ticketing_v3.yml - IssueStatus: - discriminated: false - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - union: - - IssueStatusEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - Issue: - properties: - id: - type: optional - validation: - format: uuid - access: read-only - status: - type: optional - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - error_description: string - end_user: - type: optional> - access: read-only - first_incident_time: optional - last_incident_time: optional - is_muted: - type: optional - access: read-only - error_details: - type: optional> - access: read-only - source: - openapi: ticketing_v3.yml - IssueStatusEnum: - enum: - - ONGOING - - RESOLVED - docs: |- - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - source: - openapi: ticketing_v3.yml - ItemFormatEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - docs: |- - * `string` - uuid - * `number` - url - * `date` - email - * `datetime` - phone - * `bool` - currency - * `list` - decimal - source: - openapi: ticketing_v3.yml - ItemSchema: - properties: - item_type: optional - item_format: optional - item_choices: optional> - source: - openapi: ticketing_v3.yml - ItemTypeEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - docs: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - source: - openapi: ticketing_v3.yml - LanguageEnum: - enum: - - en - - de - docs: |- - * `en` - en - * `de` - de - source: - openapi: ticketing_v3.yml - LastSyncResultEnum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - docs: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - source: - openapi: ticketing_v3.yml - LinkToken: - properties: - link_token: string - integration_name: optional - magic_link_url: optional - source: - openapi: ticketing_v3.yml - LinkedAccountStatus: - properties: - linked_account_status: string - can_make_request: boolean - source: - openapi: ticketing_v3.yml - MetaResponse: - properties: - request_schema: map - remote_field_classes: optional> - status: optional - has_conditional_params: boolean - has_required_linked_account_params: boolean - source: - openapi: ticketing_v3.yml - MethodEnum: - enum: - - GET - - OPTIONS - - HEAD - - POST - - PUT - - PATCH - - DELETE - docs: |- - * `GET` - GET - * `OPTIONS` - OPTIONS - * `HEAD` - HEAD - * `POST` - POST - * `PUT` - PUT - * `PATCH` - PATCH - * `DELETE` - DELETE - source: - openapi: ticketing_v3.yml - ModelOperation: - docs: >- - # The ModelOperation Object - - ### Description - - The `ModelOperation` object is used to represent the operations that are - currently supported for a given model. - - - ### Usage Example - - View what operations are supported for the `Candidate` endpoint. - properties: - model_name: string - available_operations: list - required_post_parameters: list - supported_fields: list - source: - openapi: ticketing_v3.yml - ModelPermissionDeserializer: - properties: - is_enabled: optional - source: - openapi: ticketing_v3.yml - ModelPermissionDeserializerRequest: - properties: - is_enabled: optional - source: - openapi: ticketing_v3.yml - MultipartFormFieldRequestEncoding: - discriminated: false - docs: |- - The encoding of the value of `data`. Defaults to `RAW` if not defined. - - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - union: - - EncodingEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - MultipartFormFieldRequest: - docs: >- - # The MultipartFormField Object - - ### Description - - The `MultipartFormField` object is used to represent fields in an HTTP - request using `multipart/form-data`. - - - ### Usage Example - - Create a `MultipartFormField` to define a multipart form entry. - properties: - name: - type: string - docs: The name of the form field - validation: - minLength: 1 - data: - type: string - docs: The data for the form field. - validation: - minLength: 1 - encoding: - type: optional - docs: |- - The encoding of the value of `data`. Defaults to `RAW` if not defined. - - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - file_name: - type: optional - docs: The file name of the form field, if the field is for a file. - validation: - minLength: 1 - content_type: - type: optional - docs: The MIME type of the file, if the field is for a file. - validation: - minLength: 1 - source: - openapi: ticketing_v3.yml - PaginatedAccountDetailsAndActionsList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ticketing_v3.yml - PaginatedAccountList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ticketing_v3.yml - PaginatedAttachmentList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ticketing_v3.yml - PaginatedAuditLogEventList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ticketing_v3.yml - PaginatedCollectionList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ticketing_v3.yml - PaginatedCommentList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ticketing_v3.yml - PaginatedContactList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ticketing_v3.yml - PaginatedIssueList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ticketing_v3.yml - PaginatedProjectList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ticketing_v3.yml - PaginatedRemoteFieldClassList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ticketing_v3.yml - PaginatedRoleList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ticketing_v3.yml - PaginatedSyncStatusList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ticketing_v3.yml - PaginatedTagList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ticketing_v3.yml - PaginatedTeamList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ticketing_v3.yml - PaginatedTicketList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ticketing_v3.yml - PaginatedUserList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ticketing_v3.yml - PaginatedViewerList: - properties: - next: optional - previous: optional - results: optional> - source: - openapi: ticketing_v3.yml - PatchedTicketRequestStatus: - discriminated: false - docs: |- - The current status of the ticket. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - * `IN_PROGRESS` - IN_PROGRESS - * `ON_HOLD` - ON_HOLD - union: - - TicketStatusEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - PatchedTicketRequestAccessLevel: - discriminated: false - docs: >- - The description of who is able to access a given ticket, or where access - is inherited from. - - - * `COMPANY` - COMPANY - - * `PUBLIC` - PUBLIC - - * `PRIVATE` - PRIVATE - - * `COLLECTION` - COLLECTION - union: - - TicketAccessLevelEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - PatchedTicketRequest: - docs: |- - # The Ticket Object - ### Description - The `Ticket` object is used to represent a ticket, issue, task or case. - ### Usage Example - TODO - properties: - name: - type: optional - docs: The ticket's name. - assignees: - type: optional>> - docs: >- - The individual `Users` who are assigned to this ticket. This does not - include `Users` who just have view access to this ticket. To fetch all - `Users` and `Teams` that can access the ticket, use the `GET - /tickets/{ticket_id}/viewers` - [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). - assigned_teams: - type: optional>> - docs: >- - The `Teams` that are assigned to this ticket. This does not include - `Teams` who just have view access to this ticket. To fetch all `Users` - and `Teams` that can access this ticket, use the `GET - /tickets/{ticket_id}/viewers` - [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). - creator: - type: optional - docs: The user who created this ticket. - validation: - format: uuid - due_date: - type: optional - docs: The ticket's due date. - status: - type: optional - docs: |- - The current status of the ticket. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - * `IN_PROGRESS` - IN_PROGRESS - * `ON_HOLD` - ON_HOLD - description: - type: optional - docs: >- - The ticket’s description. HTML version of description is mapped if - supported by the third-party platform. - collections: - type: optional>> - docs: The `Collections` that this `Ticket` is included in. - ticket_type: - type: optional - docs: >- - The sub category of the ticket within the 3rd party system. Examples - include incident, task, subtask or to-do. - account: - type: optional - docs: The account associated with the ticket. - validation: - format: uuid - contact: - type: optional - docs: The contact associated with the ticket. - validation: - format: uuid - parent_ticket: - type: optional - docs: The ticket's parent ticket. - validation: - format: uuid - access_level: - type: optional - docs: >- - The description of who is able to access a given ticket, or where - access is inherited from. - - - * `COMPANY` - COMPANY - - * `PUBLIC` - PUBLIC - - * `PRIVATE` - PRIVATE - - * `COLLECTION` - COLLECTION - tags: optional>> - roles: optional>> - completed_at: - type: optional - docs: When the ticket was completed. - ticket_url: - type: optional - docs: The 3rd party url of the Ticket. - validation: - format: uri - maxLength: 2000 - priority: - type: optional - docs: |- - The priority or urgency of the Ticket. - - * `URGENT` - URGENT - * `HIGH` - HIGH - * `NORMAL` - NORMAL - * `LOW` - LOW - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: ticketing_v3.yml - PriorityEnum: - enum: - - URGENT - - HIGH - - NORMAL - - LOW - docs: |- - * `URGENT` - URGENT - * `HIGH` - HIGH - * `NORMAL` - NORMAL - * `LOW` - LOW - source: - openapi: ticketing_v3.yml - Project: - docs: >- - # The Project Object - - ### Description - - Please use the `Collection` model. This model will be fully deprecated on - 3/30/2024. - - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: 'The project''s name. ' - description: - type: optional - docs: The project's description. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ticketing_v3.yml - RemoteData: - docs: >- - # The RemoteData Object - - ### Description - - The `RemoteData` object is used to represent the full data pulled from the - third-party API for an object. - - - ### Usage Example - - TODO - properties: - path: - type: string - docs: The third-party API path that is being called. - data: - type: optional - access: read-only - source: - openapi: ticketing_v3.yml - RemoteEndpointInfo: - properties: - method: string - url_path: string - field_traversal_path: list - source: - openapi: ticketing_v3.yml - RemoteFieldRemoteFieldClass: - discriminated: false - union: - - string - - RemoteFieldClass - source: - openapi: ticketing_v3.yml - inline: true - RemoteField: - properties: - remote_field_class: RemoteFieldRemoteFieldClass - value: optional - source: - openapi: ticketing_v3.yml - RemoteFieldApiCoverage: - discriminated: false - union: - - integer - - double - source: - openapi: ticketing_v3.yml - inline: true - RemoteFieldApi: - properties: - schema: map - remote_key_name: string - remote_endpoint_info: RemoteEndpointInfo - example_values: optional> - advanced_metadata: optional - coverage: - type: optional - access: read-only - source: - openapi: ticketing_v3.yml - RemoteFieldApiResponse: - properties: - Ticket: optional> - Comment: optional> - Project: optional> - Collection: optional> - User: optional> - Role: optional> - Account: optional> - Team: optional> - Attachment: optional> - Tag: optional> - Contact: optional> - source: - openapi: ticketing_v3.yml - RemoteFieldClassFieldChoicesItem: - properties: - value: optional - display_name: optional - source: - openapi: ticketing_v3.yml - inline: true - RemoteFieldClass: - properties: - id: optional - display_name: optional - remote_key_name: optional - description: optional - is_custom: optional - is_common_model_field: optional - is_required: optional - field_type: optional - field_format: optional - field_choices: - type: optional> - access: read-only - item_schema: optional - source: - openapi: ticketing_v3.yml - RemoteFieldRequestRemoteFieldClass: - discriminated: false - union: - - type: string - validation: - format: uuid - - RemoteFieldClass - source: - openapi: ticketing_v3.yml - inline: true - RemoteFieldRequest: - properties: - remote_field_class: RemoteFieldRequestRemoteFieldClass - value: optional - source: - openapi: ticketing_v3.yml - RemoteKey: - docs: >- - # The RemoteKey Object - - ### Description - - The `RemoteKey` object is used to represent a request for a new remote - key. - - - ### Usage Example - - Post a `GenerateRemoteKey` to receive a new `RemoteKey`. - properties: - name: string - key: string - source: - openapi: ticketing_v3.yml - RemoteResponseResponseType: - discriminated: false - union: - - ResponseTypeEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - RemoteResponse: - docs: >- - # The RemoteResponse Object - - ### Description - - The `RemoteResponse` object is used to represent information returned from - a third-party endpoint. - - - ### Usage Example - - View the `RemoteResponse` returned from your `DataPassthrough`. - properties: - method: string - path: string - status: integer - response: unknown - response_headers: optional> - response_type: optional - headers: optional> - source: - openapi: ticketing_v3.yml - RequestFormatEnum: - enum: - - JSON - - XML - - MULTIPART - docs: |- - * `JSON` - JSON - * `XML` - XML - * `MULTIPART` - MULTIPART - source: - openapi: ticketing_v3.yml - ResponseTypeEnum: - enum: - - JSON - - BASE64_GZIP - docs: |- - * `JSON` - JSON - * `BASE64_GZIP` - BASE64_GZIP - source: - openapi: ticketing_v3.yml - RoleTicketActionsItem: - discriminated: false - union: - - TicketActionsEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - RoleTicketAccess: - discriminated: false - docs: |- - The level of Ticket access that a User with this Role can perform. - - * `ALL` - ALL - * `ASSIGNED_ONLY` - ASSIGNED_ONLY - * `TEAM_ONLY` - TEAM_ONLY - union: - - TicketAccessEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - Role: - docs: >- - # The Role Object - - ### Description - - The `Role` object is used to represent the set of actions & access that a - user with this role is allowed to perform. - - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The name of the Role. - ticket_actions: - type: optional>> - docs: >- - The set of actions that a User with this Role can perform. Possible - enum values include: `VIEW`, `CREATE`, `EDIT`, `DELETE`, `CLOSE`, and - `ASSIGN`. - ticket_access: - type: optional - docs: |- - The level of Ticket access that a User with this Role can perform. - - * `ALL` - ALL - * `ASSIGNED_ONLY` - ASSIGNED_ONLY - * `TEAM_ONLY` - TEAM_ONLY - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ticketing_v3.yml - RoleEnum: - enum: - - ADMIN - - DEVELOPER - - MEMBER - - API - - SYSTEM - - MERGE_TEAM - docs: |- - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - source: - openapi: ticketing_v3.yml - SelectiveSyncConfigurationsUsageEnum: - enum: - - IN_NEXT_SYNC - - IN_LAST_SYNC - docs: |- - * `IN_NEXT_SYNC` - IN_NEXT_SYNC - * `IN_LAST_SYNC` - IN_LAST_SYNC - source: - openapi: ticketing_v3.yml - StatusFd5Enum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - docs: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - source: - openapi: ticketing_v3.yml - SyncStatusLastSyncResult: - discriminated: false - union: - - LastSyncResultEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - SyncStatusStatus: - discriminated: false - union: - - StatusFd5Enum - - string - source: - openapi: ticketing_v3.yml - inline: true - SyncStatus: - docs: >- - # The SyncStatus Object - - ### Description - - The `SyncStatus` object is used to represent the syncing state of an - account - - - ### Usage Example - - View the `SyncStatus` for an account to see how recently its models were - synced. - properties: - model_name: string - model_id: string - last_sync_start: optional - next_sync_start: optional - last_sync_result: optional - last_sync_finished: optional - status: SyncStatusStatus - is_initial_sync: boolean - selective_sync_configurations_usage: optional - source: - openapi: ticketing_v3.yml - Tag: - docs: |- - # The Tag Object - ### Description - The `Tag` object is used to represent a tag or label for a ticket. - - ### Usage Example - TODO - properties: - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - id: - type: optional - validation: - format: uuid - access: read-only - name: - type: optional - docs: The tag's name. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ticketing_v3.yml - Team: - docs: >- - # The Team Object - - ### Description - - The `Team` object is used to represent one or more `Users` within the - company receiving the ticket. - - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The team's name. - description: - type: optional - docs: The team's description. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ticketing_v3.yml - TicketAssigneesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - User - source: - openapi: ticketing_v3.yml - inline: true - TicketAssignedTeamsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Team - source: - openapi: ticketing_v3.yml - inline: true - TicketCreator: - discriminated: false - docs: The user who created this ticket. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: ticketing_v3.yml - inline: true - TicketStatus: - discriminated: false - docs: |- - The current status of the ticket. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - * `IN_PROGRESS` - IN_PROGRESS - * `ON_HOLD` - ON_HOLD - union: - - TicketStatusEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - TicketCollectionsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Collection - source: - openapi: ticketing_v3.yml - inline: true - TicketAccount: - discriminated: false - docs: The account associated with the ticket. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: ticketing_v3.yml - inline: true - TicketContact: - discriminated: false - docs: The contact associated with the ticket. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: ticketing_v3.yml - inline: true - TicketParentTicket: - discriminated: false - docs: The ticket's parent ticket. - union: - - type: string - validation: - format: uuid - - Ticket - source: - openapi: ticketing_v3.yml - inline: true - TicketAttachmentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Attachment - source: - openapi: ticketing_v3.yml - inline: true - TicketAccessLevel: - discriminated: false - docs: >- - The description of who is able to access a given ticket, or where access - is inherited from. - - - * `COMPANY` - COMPANY - - * `PUBLIC` - PUBLIC - - * `PRIVATE` - PRIVATE - - * `COLLECTION` - COLLECTION - union: - - TicketAccessLevelEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - TicketPriority: - discriminated: false - docs: |- - The priority or urgency of the Ticket. - - * `URGENT` - URGENT - * `HIGH` - HIGH - * `NORMAL` - NORMAL - * `LOW` - LOW - union: - - PriorityEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - Ticket: - docs: |- - # The Ticket Object - ### Description - The `Ticket` object is used to represent a ticket, issue, task or case. - ### Usage Example - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The ticket's name. - assignees: - type: optional>> - docs: >- - The individual `Users` who are assigned to this ticket. This does not - include `Users` who just have view access to this ticket. To fetch all - `Users` and `Teams` that can access the ticket, use the `GET - /tickets/{ticket_id}/viewers` - [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). - assigned_teams: - type: optional>> - docs: >- - The `Teams` that are assigned to this ticket. This does not include - `Teams` who just have view access to this ticket. To fetch all `Users` - and `Teams` that can access this ticket, use the `GET - /tickets/{ticket_id}/viewers` - [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). - creator: - type: optional - docs: The user who created this ticket. - due_date: - type: optional - docs: The ticket's due date. - status: - type: optional - docs: |- - The current status of the ticket. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - * `IN_PROGRESS` - IN_PROGRESS - * `ON_HOLD` - ON_HOLD - description: - type: optional - docs: >- - The ticket’s description. HTML version of description is mapped if - supported by the third-party platform. - collections: - type: optional>> - docs: The `Collections` that this `Ticket` is included in. - ticket_type: - type: optional - docs: >- - The sub category of the ticket within the 3rd party system. Examples - include incident, task, subtask or to-do. - account: - type: optional - docs: The account associated with the ticket. - contact: - type: optional - docs: The contact associated with the ticket. - parent_ticket: - type: optional - docs: The ticket's parent ticket. - attachments: optional>> - access_level: - type: optional - docs: >- - The description of who is able to access a given ticket, or where - access is inherited from. - - - * `COMPANY` - COMPANY - - * `PUBLIC` - PUBLIC - - * `PRIVATE` - PRIVATE - - * `COLLECTION` - COLLECTION - tags: optional>> - roles: optional>> - ticket_url: - type: optional - docs: The 3rd party url of the Ticket. - validation: - format: uri - maxLength: 2000 - priority: - type: optional - docs: |- - The priority or urgency of the Ticket. - - * `URGENT` - URGENT - * `HIGH` - HIGH - * `NORMAL` - NORMAL - * `LOW` - LOW - remote_created_at: - type: optional - docs: When the third party's ticket was created. - remote_updated_at: - type: optional - docs: When the third party's ticket was updated. - completed_at: - type: optional - docs: When the ticket was completed. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - remote_fields: - type: optional> - access: read-only - source: - openapi: ticketing_v3.yml - TicketAccessEnum: - enum: - - ALL - - ASSIGNED_ONLY - - TEAM_ONLY - docs: |- - * `ALL` - ALL - * `ASSIGNED_ONLY` - ASSIGNED_ONLY - * `TEAM_ONLY` - TEAM_ONLY - source: - openapi: ticketing_v3.yml - TicketAccessLevelEnum: - enum: - - COMPANY - - PUBLIC - - PRIVATE - - COLLECTION - docs: |- - * `COMPANY` - COMPANY - * `PUBLIC` - PUBLIC - * `PRIVATE` - PRIVATE - * `COLLECTION` - COLLECTION - source: - openapi: ticketing_v3.yml - TicketActionsEnum: - enum: - - VIEW - - CREATE - - EDIT - - DELETE - - CLOSE - - ASSIGN - docs: |- - * `VIEW` - VIEW - * `CREATE` - CREATE - * `EDIT` - EDIT - * `DELETE` - DELETE - * `CLOSE` - CLOSE - * `ASSIGN` - ASSIGN - source: - openapi: ticketing_v3.yml - TicketRequestAssigneesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - User - source: - openapi: ticketing_v3.yml - inline: true - TicketRequestAssignedTeamsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Team - source: - openapi: ticketing_v3.yml - inline: true - TicketRequestCreator: - discriminated: false - docs: The user who created this ticket. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: ticketing_v3.yml - inline: true - TicketRequestStatus: - discriminated: false - docs: |- - The current status of the ticket. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - * `IN_PROGRESS` - IN_PROGRESS - * `ON_HOLD` - ON_HOLD - union: - - TicketStatusEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - TicketRequestCollectionsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Collection - source: - openapi: ticketing_v3.yml - inline: true - TicketRequestAccount: - discriminated: false - docs: The account associated with the ticket. - union: - - type: string - validation: - format: uuid - - Account - source: - openapi: ticketing_v3.yml - inline: true - TicketRequestContact: - discriminated: false - docs: The contact associated with the ticket. - union: - - type: string - validation: - format: uuid - - Contact - source: - openapi: ticketing_v3.yml - inline: true - TicketRequestParentTicket: - discriminated: false - docs: The ticket's parent ticket. - union: - - type: string - validation: - format: uuid - - Ticket - source: - openapi: ticketing_v3.yml - inline: true - TicketRequestAttachmentsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Attachment - source: - openapi: ticketing_v3.yml - inline: true - TicketRequestAccessLevel: - discriminated: false - docs: >- - The description of who is able to access a given ticket, or where access - is inherited from. - - - * `COMPANY` - COMPANY - - * `PUBLIC` - PUBLIC - - * `PRIVATE` - PRIVATE - - * `COLLECTION` - COLLECTION - union: - - TicketAccessLevelEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - TicketRequestPriority: - discriminated: false - docs: |- - The priority or urgency of the Ticket. - - * `URGENT` - URGENT - * `HIGH` - HIGH - * `NORMAL` - NORMAL - * `LOW` - LOW - union: - - PriorityEnum - - string - source: - openapi: ticketing_v3.yml - inline: true - TicketRequest: - docs: |- - # The Ticket Object - ### Description - The `Ticket` object is used to represent a ticket, issue, task or case. - ### Usage Example - TODO - properties: - name: - type: optional - docs: The ticket's name. - assignees: - type: optional>> - docs: >- - The individual `Users` who are assigned to this ticket. This does not - include `Users` who just have view access to this ticket. To fetch all - `Users` and `Teams` that can access the ticket, use the `GET - /tickets/{ticket_id}/viewers` - [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). - assigned_teams: - type: optional>> - docs: >- - The `Teams` that are assigned to this ticket. This does not include - `Teams` who just have view access to this ticket. To fetch all `Users` - and `Teams` that can access this ticket, use the `GET - /tickets/{ticket_id}/viewers` - [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). - creator: - type: optional - docs: The user who created this ticket. - due_date: - type: optional - docs: The ticket's due date. - status: - type: optional - docs: |- - The current status of the ticket. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - * `IN_PROGRESS` - IN_PROGRESS - * `ON_HOLD` - ON_HOLD - description: - type: optional - docs: >- - The ticket’s description. HTML version of description is mapped if - supported by the third-party platform. - collections: - type: optional>> - docs: The `Collections` that this `Ticket` is included in. - ticket_type: - type: optional - docs: >- - The sub category of the ticket within the 3rd party system. Examples - include incident, task, subtask or to-do. - account: - type: optional - docs: The account associated with the ticket. - contact: - type: optional - docs: The contact associated with the ticket. - parent_ticket: - type: optional - docs: The ticket's parent ticket. - attachments: optional>> - access_level: - type: optional - docs: >- - The description of who is able to access a given ticket, or where - access is inherited from. - - - * `COMPANY` - COMPANY - - * `PUBLIC` - PUBLIC - - * `PRIVATE` - PRIVATE - - * `COLLECTION` - COLLECTION - tags: optional>> - roles: optional>> - completed_at: - type: optional - docs: When the ticket was completed. - ticket_url: - type: optional - docs: The 3rd party url of the Ticket. - validation: - format: uri - maxLength: 2000 - priority: - type: optional - docs: |- - The priority or urgency of the Ticket. - - * `URGENT` - URGENT - * `HIGH` - HIGH - * `NORMAL` - NORMAL - * `LOW` - LOW - integration_params: - type: optional> - access: write-only - linked_account_params: - type: optional> - access: write-only - remote_fields: - type: optional> - access: write-only - source: - openapi: ticketing_v3.yml - TicketResponse: - properties: - model: Ticket - warnings: list - errors: list - logs: optional> - source: - openapi: ticketing_v3.yml - TicketStatusEnum: - enum: - - OPEN - - CLOSED - - IN_PROGRESS - - ON_HOLD - docs: |- - * `OPEN` - OPEN - * `CLOSED` - CLOSED - * `IN_PROGRESS` - IN_PROGRESS - * `ON_HOLD` - ON_HOLD - source: - openapi: ticketing_v3.yml - TicketingAttachmentResponse: - properties: - model: Attachment - warnings: list - errors: list - logs: optional> - source: - openapi: ticketing_v3.yml - TicketingContactResponse: - properties: - model: Contact - warnings: list - errors: list - logs: optional> - source: - openapi: ticketing_v3.yml - UserTeamsItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Team - source: - openapi: ticketing_v3.yml - inline: true - UserRolesItem: - discriminated: false - union: - - type: string - validation: - format: uuid - - Role - source: - openapi: ticketing_v3.yml - inline: true - User: - docs: >- - # The User Object - - ### Description - - The `User` object is used to represent a user with a login to the - ticketing system. - - Users are either assignees who are directly responsible or a viewer on a - `Ticket`/ `Collection`. - - - ### Usage Example - - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - name: - type: optional - docs: The user's name. - email_address: - type: optional - docs: The user's email address. - is_active: - type: optional - docs: Whether or not the user is active. - teams: optional>> - roles: optional>> - avatar: - type: optional - docs: The user's avatar picture. - remote_was_deleted: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. - [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - access: read-only - field_mappings: - type: optional> - access: read-only - remote_data: - type: optional> - access: read-only - source: - openapi: ticketing_v3.yml - ValidationProblemSource: - properties: - pointer: string - source: - openapi: ticketing_v3.yml - ViewerTeam: - discriminated: false - docs: The Team this Viewer belongs to. - union: - - type: string - validation: - format: uuid - - Team - source: - openapi: ticketing_v3.yml - inline: true - ViewerUser: - discriminated: false - docs: The User this Viewer belongs to. - union: - - type: string - validation: - format: uuid - - User - source: - openapi: ticketing_v3.yml - inline: true - Viewer: - docs: |- - # The Viewer Object - ### Description - The `Viewer` object is used to represent a User or Team within a company. - - ### Usage Example - TODO - properties: - id: - type: optional - validation: - format: uuid - access: read-only - remote_id: - type: optional - docs: The third-party API ID of the matching object. - created_at: - type: optional - docs: The datetime that this object was created by Merge. - access: read-only - modified_at: - type: optional - docs: The datetime that this object was modified by Merge. - access: read-only - team: - type: optional - docs: The Team this Viewer belongs to. - user: - type: optional - docs: The User this Viewer belongs to. - source: - openapi: ticketing_v3.yml - WarningValidationProblem: - properties: - source: optional - title: string - detail: string - problem_type: string - source: - openapi: ticketing_v3.yml - WebhookReceiver: - properties: - event: string - is_active: boolean - key: optional - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/accountDetails.yml b/.mock/definition/Ticketing/accountDetails.yml deleted file mode 100644 index b5b6bd417..000000000 --- a/.mock/definition/Ticketing/accountDetails.yml +++ /dev/null @@ -1,38 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /ticketing/v1/account-details - method: GET - auth: - - tokenAuth: [] - docs: Get details for a linked account. - source: - openapi: ticketing_v3.yml - response: - docs: '' - type: ticketingRoot.AccountDetails - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - integration: BambooHR - integration_slug: bamboohr - category: hris - end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - end_user_organization_name: Waystar Royco - end_user_email_address: kendall.roy@waystar-royco.com - status: COMPLETE - webhook_listener_url: >- - https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: true - account_type: PRODUCTION - completed_at: '2024-08-26T20:11:19Z' - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/accountToken.yml b/.mock/definition/Ticketing/accountToken.yml deleted file mode 100644 index 2f2e9e091..000000000 --- a/.mock/definition/Ticketing/accountToken.yml +++ /dev/null @@ -1,47 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /ticketing/v1/account-token/{public_token} - method: GET - auth: - - tokenAuth: [] - docs: >- - Returns the account token for the end user with the provided public - token. - source: - openapi: ticketing_v3.yml - path-parameters: - public_token: string - response: - docs: '' - type: ticketingRoot.AccountToken - status-code: 200 - examples: - - path-parameters: - public_token: public_token - headers: - X-Account-Token: '[object Object]' - response: - body: - account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB - integration: - name: name - abbreviated_name: abbreviated_name - categories: - - hris - image: image - square_image: square_image - color: color - slug: slug - api_endpoints_to_documentation_urls: - key: value - webhook_setup_guide_url: webhook_setup_guide_url - category_beta_status: - key: value - id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/accounts.yml b/.mock/definition/Ticketing/accounts.yml deleted file mode 100644 index f27dbee0c..000000000 --- a/.mock/definition/Ticketing/accounts.yml +++ /dev/null @@ -1,164 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ticketing/v1/accounts - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Account` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - request: - name: AccountsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: ticketingRoot.PaginatedAccountList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Waystar Royco - domains: - - waystar-royco.com - - royco.com - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - retrieve: - path: /ticketing/v1/accounts/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Account` object with the given `id`. - source: - openapi: ticketing_v3.yml - path-parameters: - id: string - request: - name: AccountsRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: ticketingRoot.Account - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Waystar Royco - domains: - - waystar-royco.com - - royco.com - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /actions - data: - - Varies by platform - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/asyncPassthrough.yml b/.mock/definition/Ticketing/asyncPassthrough.yml deleted file mode 100644 index 7f570a7e6..000000000 --- a/.mock/definition/Ticketing/asyncPassthrough.yml +++ /dev/null @@ -1,74 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /ticketing/v1/async-passthrough - method: POST - auth: - - tokenAuth: [] - docs: >- - Asynchronously pull data from an endpoint not currently supported by - Merge. - source: - openapi: ticketing_v3.yml - request: - body: ticketingRoot.DataPassthroughRequest - content-type: application/json - response: - docs: '' - type: ticketingRoot.AsyncPassthroughReciept - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - method: GET - path: /scooters - response: - body: - async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd - retrieve: - path: /ticketing/v1/async-passthrough/{async_passthrough_receipt_id} - method: GET - auth: - - tokenAuth: [] - docs: Retrieves data from earlier async-passthrough POST request - source: - openapi: ticketing_v3.yml - path-parameters: - async_passthrough_receipt_id: string - response: - docs: '' - type: AsyncPassthroughRetrieveResponse - status-code: 200 - examples: - - path-parameters: - async_passthrough_receipt_id: async_passthrough_receipt_id - headers: - X-Account-Token: X-Account-Token - response: - body: - method: GET - path: /scooters - status: 200 - response: - key: value - response_headers: - X-Page-Token: value - response_type: JSON - headers: - EXTRA-HEADER: value - Authorization: - source: - openapi: ticketing_v3.yml -types: - AsyncPassthroughRetrieveResponse: - discriminated: false - union: - - ticketingRoot.RemoteResponse - - string - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/attachments.yml b/.mock/definition/Ticketing/attachments.yml deleted file mode 100644 index e1c9d0dfd..000000000 --- a/.mock/definition/Ticketing/attachments.yml +++ /dev/null @@ -1,480 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ticketing/v1/attachments - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Attachment` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - request: - name: AttachmentsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_created_after: - type: optional - docs: >- - If provided, will only return attachments created in the third - party platform after this datetime. - remote_id: - type: optional - docs: The API provider's ID for the given object. - ticket_id: - type: optional - docs: If provided, will only return comments for this ticket. - response: - docs: '' - type: ticketingRoot.PaginatedAttachmentList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_created_after: '2024-01-15T09:30:00Z' - remote_id: remote_id - ticket_id: ticket_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - file_name: Screenshot.png - ticket: ticket - file_url: http://alturl.com/p749b - content_type: jpeg - uploaded_by: 28b54125-287f-494d-965e-3c5b330c9a68 - remote_created_at: '2022-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - create: - path: /ticketing/v1/attachments - method: POST - auth: - - tokenAuth: [] - docs: Creates an `Attachment` object with the given values. - source: - openapi: ticketing_v3.yml - request: - name: TicketingAttachmentEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: ticketingRoot.AttachmentRequest - content-type: application/json - response: - docs: '' - type: ticketingRoot.TicketingAttachmentResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - file_name: Screenshot.png - ticket: ticket - file_url: http://alturl.com/p749b - content_type: jpeg - uploaded_by: 28b54125-287f-494d-965e-3c5b330c9a68 - remote_created_at: '2022-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /ticketing/v1/attachments/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns an `Attachment` object with the given `id`. - source: - openapi: ticketing_v3.yml - path-parameters: - id: string - request: - name: AttachmentsRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: ticketingRoot.Attachment - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - file_name: Screenshot.png - ticket: ticket - file_url: http://alturl.com/p749b - content_type: jpeg - uploaded_by: 28b54125-287f-494d-965e-3c5b330c9a68 - remote_created_at: '2022-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - data: - key: value - downloadRetrieve: - path: /ticketing/v1/attachments/{id}/download - method: GET - auth: - - tokenAuth: [] - docs: Returns the `File` content with the given `id` as a stream of bytes. - source: - openapi: ticketing_v3.yml - path-parameters: - id: string - request: - name: AttachmentsDownloadRetrieveRequest - query-parameters: - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - mime_type: - type: optional - docs: >- - If provided, specifies the export format of the file to be - downloaded. For information on supported export formats, please - refer to our export format help center article. - response: - docs: '' - type: file - status-code: 200 - metaPostRetrieve: - path: /ticketing/v1/attachments/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `TicketingAttachment` POSTs. - source: - openapi: ticketing_v3.yml - response: - docs: '' - type: ticketingRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/auditTrail.yml b/.mock/definition/Ticketing/auditTrail.yml deleted file mode 100644 index bbc472c92..000000000 --- a/.mock/definition/Ticketing/auditTrail.yml +++ /dev/null @@ -1,108 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ticketing/v1/audit-trail - method: GET - auth: - - tokenAuth: [] - docs: Gets a list of audit trail events. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - request: - name: AuditTrailListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - end_date: - type: optional - docs: >- - If included, will only include audit trail events that occurred - before this time - event_type: - type: optional - docs: >- - If included, will only include events with the given event type. - Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, - `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, - `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, - `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, - `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, - `DELETED_LINKED_ACCOUNT`, - `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, - `CREATED_DESTINATION`, `DELETED_DESTINATION`, - `CHANGED_DESTINATION`, `CHANGED_SCOPES`, - `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, - `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, - `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, - `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, - `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, - `END_USER_CREDENTIALS_ACCESSED` - page_size: - type: optional - docs: Number of results to return per page. - start_date: - type: optional - docs: >- - If included, will only include audit trail events that occurred - after this time - user_email: - type: optional - docs: >- - If provided, this will return events associated with the specified - user email. Please note that the email address reflects the user's - email at the time of the event, and may not be their current - email. - response: - docs: '' - type: ticketingRoot.PaginatedAuditLogEventList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_date: end_date - event_type: event_type - page_size: 1 - start_date: start_date - user_email: user_email - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: b5ceea2a-7171-47ce-8090-165cfce5572c - user_name: Gil Feig - user_email: hello@merge.dev - role: ADMIN - ip_address: 192.0.2.123 - event_type: CREATED_REMOTE_PRODUCTION_API_KEY - event_description: >- - Organization-wide Scopes for model hris.Employee updated - from Read to Read+Write - created_at: '2024-01-15T09:30:00Z' - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/availableActions.yml b/.mock/definition/Ticketing/availableActions.yml deleted file mode 100644 index a29cc9c8b..000000000 --- a/.mock/definition/Ticketing/availableActions.yml +++ /dev/null @@ -1,52 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - retrieve: - path: /ticketing/v1/available-actions - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of models and actions available for an account. - source: - openapi: ticketing_v3.yml - response: - docs: '' - type: ticketingRoot.AvailableActions - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - integration: - name: name - abbreviated_name: abbreviated_name - categories: - - hris - image: image - square_image: square_image - color: color - slug: slug - api_endpoints_to_documentation_urls: - key: value - webhook_setup_guide_url: webhook_setup_guide_url - category_beta_status: - key: value - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/collections.yml b/.mock/definition/Ticketing/collections.yml deleted file mode 100644 index 4ad4bfe8f..000000000 --- a/.mock/definition/Ticketing/collections.yml +++ /dev/null @@ -1,312 +0,0 @@ -types: - CollectionsListRequestCollectionType: - enum: - - value: '' - name: EMPTY - - LIST - - PROJECT - source: - openapi: ticketing_v3.yml - CollectionsViewersListRequestExpandItem: - enum: - - team - - user - source: - openapi: ticketing_v3.yml -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ticketing/v1/collections - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Collection` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - request: - name: CollectionsListRequest - query-parameters: - collection_type: - type: optional - docs: If provided, will only return collections of the given type. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - name: - type: optional - docs: If provided, will only return collections with this name. - page_size: - type: optional - docs: Number of results to return per page. - parent_collection_id: - type: optional - docs: >- - If provided, will only return collections whose parent collection - matches the given id. - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: ticketingRoot.PaginatedCollectionList - status-code: 200 - examples: - - query-parameters: - collection_type: '' - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - name: name - page_size: 1 - parent_collection_id: parent_collection_id - remote_fields: collection_type - remote_id: remote_id - show_enum_origins: collection_type - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Q1 Platform - description: For tracking all tasks related to Platform for Q1 - access_level: PRIVATE - collection_type: LIST - parent_collection: parent_collection - collection_url: https://example.com - remote_created_at: '2022-01-01T00:00:00Z' - remote_updated_at: '2022-01-01T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - viewersList: - path: /ticketing/v1/collections/{collection_id}/viewers - method: GET - auth: - - tokenAuth: [] - docs: >- - Returns a list of `Viewer` objects that point to a User id or Team id - that is either an assignee or viewer on a `Collection` with the given - id. [Learn - more.](https://help.merge.dev/en/articles/10333658-ticketing-access-control-list-acls) - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - path-parameters: - collection_id: string - request: - name: CollectionsViewersListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: ticketingRoot.PaginatedViewerList - status-code: 200 - examples: - - path-parameters: - collection_id: collection_id - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - team: team - user: user - retrieve: - path: /ticketing/v1/collections/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Collection` object with the given `id`. - source: - openapi: ticketing_v3.yml - path-parameters: - id: string - request: - name: CollectionsRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional> - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional> - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: ticketingRoot.Collection - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - remote_fields: collection_type - show_enum_origins: collection_type - headers: - X-Account-Token: X-Account-Token - response: - body: - id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Q1 Platform - description: For tracking all tasks related to Platform for Q1 - access_level: PRIVATE - collection_type: LIST - parent_collection: parent_collection - collection_url: https://example.com - remote_created_at: '2022-01-01T00:00:00Z' - remote_updated_at: '2022-01-01T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - data: - key: value - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/comments.yml b/.mock/definition/Ticketing/comments.yml deleted file mode 100644 index a7024c5f6..000000000 --- a/.mock/definition/Ticketing/comments.yml +++ /dev/null @@ -1,478 +0,0 @@ -types: - CommentsListRequestExpandItem: - enum: - - contact - - ticket - - user - source: - openapi: ticketing_v3.yml - CommentsRetrieveRequestExpandItem: - enum: - - contact - - ticket - - user - source: - openapi: ticketing_v3.yml -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ticketing/v1/comments - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Comment` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - request: - name: CommentsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_created_after: - type: optional - docs: >- - If provided, will only return Comments created in the third party - platform after this datetime. - remote_id: - type: optional - docs: The API provider's ID for the given object. - ticket_id: - type: optional - docs: If provided, will only return comments for this ticket. - response: - docs: '' - type: ticketingRoot.PaginatedCommentList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_created_after: '2024-01-15T09:30:00Z' - remote_id: remote_id - ticket_id: ticket_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - user: user - contact: contact - body: >- - When will these integrations be done? You all should use - Merge. - html_body: >- - When will these integrations be done? You all should use - Merge. - ticket: ticket - is_private: true - remote_created_at: '1990-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - create: - path: /ticketing/v1/comments - method: POST - auth: - - tokenAuth: [] - docs: Creates a `Comment` object with the given values. - source: - openapi: ticketing_v3.yml - request: - name: CommentEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: ticketingRoot.CommentRequest - content-type: application/json - response: - docs: '' - type: ticketingRoot.CommentResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - user: user - contact: contact - body: >- - When will these integrations be done? You all should use - Merge. - html_body: >- - When will these integrations be done? You all should use - Merge. - ticket: ticket - is_private: true - remote_created_at: '1990-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /ticketing/v1/comments/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Comment` object with the given `id`. - source: - openapi: ticketing_v3.yml - path-parameters: - id: string - request: - name: CommentsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: ticketingRoot.Comment - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - user: user - contact: contact - body: When will these integrations be done? You all should use Merge. - html_body: >- - When will these integrations be done? You all should use - Merge. - ticket: ticket - is_private: true - remote_created_at: '1990-11-10T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - data: - key: value - metaPostRetrieve: - path: /ticketing/v1/comments/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Comment` POSTs. - source: - openapi: ticketing_v3.yml - response: - docs: '' - type: ticketingRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/contacts.yml b/.mock/definition/Ticketing/contacts.yml deleted file mode 100644 index f15290628..000000000 --- a/.mock/definition/Ticketing/contacts.yml +++ /dev/null @@ -1,441 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ticketing/v1/contacts - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Contact` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - request: - name: ContactsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - email_address: - type: optional - docs: If provided, will only return Contacts that match this email. - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: ticketingRoot.PaginatedContactList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - email_address: email_address - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Cousin Greg - email_address: greg@waystar-royco.com - phone_number: '5108890293' - details: Executive Assistant to Tom Wambsgans - account: account - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - create: - path: /ticketing/v1/contacts - method: POST - auth: - - tokenAuth: [] - docs: Creates a `Contact` object with the given values. - source: - openapi: ticketing_v3.yml - request: - name: TicketingContactEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: ticketingRoot.ContactRequest - content-type: application/json - response: - docs: '' - type: ticketingRoot.TicketingContactResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Cousin Greg - email_address: greg@waystar-royco.com - phone_number: '5108890293' - details: Executive Assistant to Tom Wambsgans - account: account - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /ticketing/v1/contacts/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Contact` object with the given `id`. - source: - openapi: ticketing_v3.yml - path-parameters: - id: string - request: - name: ContactsRetrieveRequest - query-parameters: - expand: - type: optional> - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: ticketingRoot.Contact - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Cousin Greg - email_address: greg@waystar-royco.com - phone_number: '5108890293' - details: Executive Assistant to Tom Wambsgans - account: account - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - data: - key: value - metaPostRetrieve: - path: /ticketing/v1/contacts/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `TicketingContact` POSTs. - source: - openapi: ticketing_v3.yml - response: - docs: '' - type: ticketingRoot.MetaResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/deleteAccount.yml b/.mock/definition/Ticketing/deleteAccount.yml deleted file mode 100644 index bb3fabec6..000000000 --- a/.mock/definition/Ticketing/deleteAccount.yml +++ /dev/null @@ -1,17 +0,0 @@ -service: - auth: false - base-path: '' - endpoints: - delete: - path: /ticketing/v1/delete-account - method: POST - auth: - - tokenAuth: [] - docs: Delete a linked account. - source: - openapi: ticketing_v3.yml - examples: - - headers: - X-Account-Token: X-Account-Token - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/fieldMapping.yml b/.mock/definition/Ticketing/fieldMapping.yml deleted file mode 100644 index 3bbc3da4d..000000000 --- a/.mock/definition/Ticketing/fieldMapping.yml +++ /dev/null @@ -1,741 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - field_mappings_retrieve: - path: /ticketing/v1/field-mappings - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all Field Mappings for this Linked Account. Field Mappings are - mappings between third-party Remote Fields and user defined Merge - fields. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - source: - openapi: ticketing_v3.yml - request: - name: FieldMappingsRetrieveRequest - query-parameters: - exclude_remote_field_metadata: - type: optional - docs: >- - If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and - `remote_fields.schema` will be null). This will increase the speed - of the request since these fields require some calculations. - response: - docs: '' - type: ticketingRoot.FieldMappingApiInstanceResponse - status-code: 200 - examples: - - query-parameters: - exclude_remote_field_metadata: true - headers: - X-Account-Token: X-Account-Token - response: - body: - Ticket: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Comment: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Project: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Collection: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - User: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Role: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Account: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Team: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Attachment: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Tag: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - Contact: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - field_mappings_create: - path: /ticketing/v1/field-mappings - method: POST - auth: - - tokenAuth: [] - docs: >- - Create new Field Mappings that will be available after the next - scheduled sync. This will cause the next sync for this Linked Account to - sync **ALL** data from start. - source: - openapi: ticketing_v3.yml - request: - name: CreateFieldMappingRequest - query-parameters: - exclude_remote_field_metadata: - type: optional - docs: >- - If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and - `remote_fields.schema` will be null). This will increase the speed - of the request since these fields require some calculations. - body: - properties: - target_field_name: - type: string - docs: >- - The name of the target field you want this remote field to map - to. - validation: - minLength: 1 - target_field_description: - type: string - docs: >- - The description of the target field you want this remote field - to map to. - validation: - minLength: 1 - remote_field_traversal_path: - docs: >- - The field traversal path of the remote field listed when you hit - the GET /remote-fields endpoint. - type: list - remote_method: - type: string - docs: >- - The method of the remote endpoint where the remote field is - coming from. - validation: - minLength: 1 - remote_url_path: - type: string - docs: >- - The path of the remote endpoint where the remote field is coming - from. - validation: - minLength: 1 - common_model_name: - type: string - docs: >- - The name of the Common Model that the remote field corresponds - to in a given category. - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: ticketingRoot.FieldMappingInstanceResponse - status-code: 201 - examples: - - query-parameters: - exclude_remote_field_metadata: true - headers: - X-Account-Token: X-Account-Token - request: - target_field_name: example_target_field_name - target_field_description: this is a example description of the target field - remote_field_traversal_path: - - example_remote_field - remote_method: GET - remote_url_path: /example-url-path - common_model_name: ExampleCommonModel - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - field_mappings_destroy: - path: /ticketing/v1/field-mappings/{field_mapping_id} - method: DELETE - auth: - - tokenAuth: [] - docs: >- - Deletes Field Mappings for a Linked Account. All data related to this - Field Mapping will be deleted and these changes will be reflected after - the next scheduled sync. This will cause the next sync for this Linked - Account to sync **ALL** data from start. - source: - openapi: ticketing_v3.yml - path-parameters: - field_mapping_id: string - response: - docs: '' - type: ticketingRoot.FieldMappingInstanceResponse - status-code: 204 - examples: - - path-parameters: - field_mapping_id: field_mapping_id - headers: - X-Account-Token: X-Account-Token - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - field_mappings_partial_update: - path: /ticketing/v1/field-mappings/{field_mapping_id} - method: PATCH - auth: - - tokenAuth: [] - docs: >- - Create or update existing Field Mappings for a Linked Account. Changes - will be reflected after the next scheduled sync. This will cause the - next sync for this Linked Account to sync **ALL** data from start. - source: - openapi: ticketing_v3.yml - path-parameters: - field_mapping_id: string - request: - name: PatchedEditFieldMappingRequest - body: - properties: - remote_field_traversal_path: - type: optional> - docs: >- - The field traversal path of the remote field listed when you hit - the GET /remote-fields endpoint. - remote_method: - type: optional - docs: >- - The method of the remote endpoint where the remote field is - coming from. - validation: - minLength: 1 - remote_url_path: - type: optional - docs: >- - The path of the remote endpoint where the remote field is coming - from. - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: ticketingRoot.FieldMappingInstanceResponse - status-code: 200 - examples: - - path-parameters: - field_mapping_id: field_mapping_id - headers: - X-Account-Token: X-Account-Token - request: {} - response: - body: - model: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: true - target_field: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - remote_fields_retrieve: - path: /ticketing/v1/remote-fields - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all remote fields for a Linked Account. Remote fields are - third-party fields that are accessible after initial sync if remote_data - is enabled. You can use remote fields to override existing Merge fields - or map a new Merge field. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - source: - openapi: ticketing_v3.yml - request: - name: RemoteFieldsRetrieveRequest - query-parameters: - common_models: - type: optional - docs: >- - A comma seperated list of Common Model names. If included, will - only return Remote Fields for those Common Models. - include_example_values: - type: optional - docs: >- - If true, will include example values, where available, for remote - fields in the 3rd party platform. These examples come from active - data from your customers. - response: - docs: '' - type: ticketingRoot.RemoteFieldApiResponse - status-code: 200 - examples: - - query-parameters: - common_models: common_models - include_example_values: include_example_values - headers: - X-Account-Token: X-Account-Token - response: - body: - Ticket: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Comment: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Project: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Collection: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - User: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Role: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Account: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Team: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Attachment: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Tag: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - Contact: - - schema: - type: string - remote_key_name: example_remote_key_name - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - - example - advanced_metadata: - id: id - coverage: 1 - target_fields_retrieve: - path: /ticketing/v1/target-fields - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all organization-wide Target Fields, this will not include any - Linked Account specific Target Fields. Organization-wide Target Fields - are additional fields appended to the Merge Common Model for all Linked - Accounts in a category. [Learn - more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). - source: - openapi: ticketing_v3.yml - response: - docs: '' - type: ticketingRoot.ExternalTargetFieldApiResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - Ticket: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Comment: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Project: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Collection: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - User: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Role: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Account: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Team: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Attachment: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Tag: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - Contact: - - name: example_target_field_name - description: this is a example description of a target field - is_mapped: is_mapped - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/forceResync.yml b/.mock/definition/Ticketing/forceResync.yml deleted file mode 100644 index 9e91fd2d1..000000000 --- a/.mock/definition/Ticketing/forceResync.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - sync_status_resync_create: - path: /ticketing/v1/sync-status/resync - method: POST - auth: - - tokenAuth: [] - docs: >- - Force re-sync of all models. This endpoint is available for monthly, - quarterly, and highest sync frequency customers on the Professional or - Enterprise plans. Doing so will consume a sync credit for the relevant - linked account. Force re-syncs can also be triggered manually in the - Merge Dashboard and is available for all customers. - source: - openapi: ticketing_v3.yml - response: - docs: '' - type: list - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - - model_name: Ticket - model_id: ticketing.Ticket - last_sync_start: '2021-03-30T19:44:18Z' - next_sync_start: '2021-03-30T20:44:18Z' - last_sync_result: SYNCING - last_sync_finished: '2021-03-30T19:55:18Z' - status: SYNCING - is_initial_sync: true - selective_sync_configurations_usage: IN_NEXT_SYNC - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/generateKey.yml b/.mock/definition/Ticketing/generateKey.yml deleted file mode 100644 index 7e6164a84..000000000 --- a/.mock/definition/Ticketing/generateKey.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /ticketing/v1/generate-key - method: POST - auth: - - tokenAuth: [] - docs: Create a remote key. - source: - openapi: ticketing_v3.yml - request: - name: GenerateRemoteKeyRequest - body: - properties: - name: - type: string - docs: The name of the remote key - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: ticketingRoot.RemoteKey - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - name: Remote Deployment Key 1 - response: - body: - name: Remote Deployment Key 1 - key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/issues.yml b/.mock/definition/Ticketing/issues.yml deleted file mode 100644 index dbeaa54d9..000000000 --- a/.mock/definition/Ticketing/issues.yml +++ /dev/null @@ -1,154 +0,0 @@ -types: - IssuesListRequestStatus: - enum: - - ONGOING - - RESOLVED - source: - openapi: ticketing_v3.yml -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ticketing/v1/issues - method: GET - auth: - - tokenAuth: [] - docs: Gets all issues for Organization. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - request: - name: IssuesListRequest - query-parameters: - account_token: optional - cursor: - type: optional - docs: The pagination cursor value. - end_date: - type: optional - docs: >- - If included, will only include issues whose most recent action - occurred before this time - end_user_organization_name: optional - first_incident_time_after: - type: optional - docs: >- - If provided, will only return issues whose first incident time was - after this datetime. - first_incident_time_before: - type: optional - docs: >- - If provided, will only return issues whose first incident time was - before this datetime. - include_muted: - type: optional - docs: If true, will include muted issues - integration_name: optional - last_incident_time_after: - type: optional - docs: >- - If provided, will only return issues whose last incident time was - after this datetime. - last_incident_time_before: - type: optional - docs: >- - If provided, will only return issues whose last incident time was - before this datetime. - linked_account_id: - type: optional - docs: >- - If provided, will only include issues pertaining to the linked - account passed in. - page_size: - type: optional - docs: Number of results to return per page. - start_date: - type: optional - docs: >- - If included, will only include issues whose most recent action - occurred after this time - status: - type: optional - docs: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - response: - docs: '' - type: ticketingRoot.PaginatedIssueList - status-code: 200 - examples: - - query-parameters: - account_token: account_token - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_date: end_date - end_user_organization_name: end_user_organization_name - first_incident_time_after: '2024-01-15T09:30:00Z' - first_incident_time_before: '2024-01-15T09:30:00Z' - include_muted: include_muted - integration_name: integration_name - last_incident_time_after: '2024-01-15T09:30:00Z' - last_incident_time_before: '2024-01-15T09:30:00Z' - linked_account_id: linked_account_id - page_size: 1 - start_date: start_date - status: ONGOING - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: ONGOING - error_description: Missing Permissions - end_user: - key: value - first_incident_time: '2022-12-05T16:19:15Z' - last_incident_time: '2022-12-05T16:19:15Z' - is_muted: true - error_details: - - Missing employee permissions. - - Missing time off permissions. - retrieve: - path: /ticketing/v1/issues/{id} - method: GET - auth: - - tokenAuth: [] - docs: Get a specific issue. - source: - openapi: ticketing_v3.yml - path-parameters: - id: string - response: - docs: '' - type: ticketingRoot.Issue - status-code: 200 - examples: - - path-parameters: - id: id - headers: - X-Account-Token: '[object Object]' - response: - body: - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: ONGOING - error_description: Missing Permissions - end_user: - key: value - first_incident_time: '2022-12-05T16:19:15Z' - last_incident_time: '2022-12-05T16:19:15Z' - is_muted: true - error_details: - - Missing employee permissions. - - Missing time off permissions. - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/linkToken.yml b/.mock/definition/Ticketing/linkToken.yml deleted file mode 100644 index 90f0862fd..000000000 --- a/.mock/definition/Ticketing/linkToken.yml +++ /dev/null @@ -1,155 +0,0 @@ -imports: - ticketingRoot: __package__.yml -types: - EndUserDetailsRequestLanguage: - discriminated: false - docs: >- - The following subset of IETF language tags can be used to configure - localization. - - - * `en` - en - - * `de` - de - union: - - ticketingRoot.LanguageEnum - - string - source: - openapi: ticketing_v3.yml - inline: true -service: - auth: false - base-path: '' - endpoints: - create: - path: /ticketing/v1/link-token - method: POST - auth: - - tokenAuth: [] - docs: Creates a link token to be used when linking a new end user. - source: - openapi: ticketing_v3.yml - request: - name: EndUserDetailsRequest - body: - properties: - end_user_email_address: - type: string - docs: >- - Your end user's email address. This is purely for identification - purposes - setting this value will not cause any emails to be - sent. - validation: - minLength: 1 - maxLength: 100 - end_user_organization_name: - type: string - docs: Your end user's organization. - validation: - minLength: 1 - maxLength: 100 - end_user_origin_id: - type: string - docs: >- - This unique identifier typically represents the ID for your end - user in your product's database. This value must be distinct - from other Linked Accounts' unique identifiers. - validation: - minLength: 1 - maxLength: 100 - categories: - docs: The integration categories to show in Merge Link. - type: list - integration: - type: optional - docs: >- - The slug of a specific pre-selected integration for this linking - flow token. For examples of slugs, see - https://docs.merge.dev/guides/merge-link/single-integration/. - validation: - minLength: 1 - link_expiry_mins: - type: optional - docs: >- - An integer number of minutes between [30, 720 or 10080 if for a - Magic Link URL] for how long this token is valid. Defaults to - 30. - default: 30 - validation: - min: 30 - max: 10080 - should_create_magic_link_url: - type: optional - docs: >- - Whether to generate a Magic Link URL. Defaults to false. For - more information on Magic Link, see - https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - default: false - hide_admin_magic_link: - type: optional - docs: >- - Whether to generate a Magic Link URL on the Admin Needed screen - during the linking flow. Defaults to false. For more information - on Magic Link, see - https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - default: false - common_models: - type: optional> - docs: >- - An array of objects to specify the models and fields that will - be disabled for a given Linked Account. Each object uses - model_id, enabled_actions, and disabled_fields to specify the - model, method, and fields that are scoped for a given Linked - Account. - category_common_model_scopes: - type: >- - optional>>> - docs: >- - When creating a Link Token, you can set permissions for Common - Models that will apply to the account that is going to be - linked. Any model or field not specified in link token payload - will default to existing settings. - language: - type: optional - docs: >- - The following subset of IETF language tags can be used to - configure localization. - - - * `en` - en - - * `de` - de - are_syncs_disabled: - type: optional - docs: >- - The boolean that indicates whether initial, periodic, and force - syncs will be disabled. - default: false - integration_specific_config: - type: optional> - docs: >- - A JSON object containing integration-specific configuration - options. - content-type: application/json - response: - docs: '' - type: ticketingRoot.LinkToken - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - end_user_email_address: example@gmail.com - end_user_organization_name: Test Organization - end_user_origin_id: '12345' - categories: - - hris - - ats - response: - body: - link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 - integration_name: Lever - magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/linkedAccounts.yml b/.mock/definition/Ticketing/linkedAccounts.yml deleted file mode 100644 index f4d447469..000000000 --- a/.mock/definition/Ticketing/linkedAccounts.yml +++ /dev/null @@ -1,169 +0,0 @@ -types: - LinkedAccountsListRequestCategory: - enum: - - accounting - - ats - - crm - - filestorage - - hris - - mktg - - ticketing - source: - openapi: ticketing_v3.yml -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ticketing/v1/linked-accounts - method: GET - auth: - - tokenAuth: [] - docs: List linked accounts for your organization. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - request: - name: LinkedAccountsListRequest - query-parameters: - category: - type: optional - docs: >- - Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, - `mktg`, `ticketing` - - - * `hris` - hris - - * `ats` - ats - - * `accounting` - accounting - - * `ticketing` - ticketing - - * `crm` - crm - - * `mktg` - mktg - - * `filestorage` - filestorage - cursor: - type: optional - docs: The pagination cursor value. - end_user_email_address: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given email address. - end_user_organization_name: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given organization name. - end_user_origin_id: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given origin ID. - end_user_origin_ids: - type: optional - docs: >- - Comma-separated list of EndUser origin IDs, making it possible to - specify multiple EndUsers at once. - id: - type: optional - validation: - format: uuid - ids: - type: optional - docs: >- - Comma-separated list of LinkedAccount IDs, making it possible to - specify multiple LinkedAccounts at once. - include_duplicates: - type: optional - docs: >- - If `true`, will include complete production duplicates of the - account specified by the `id` query parameter in the response. - `id` must be for a complete production linked account. - integration_name: - type: optional - docs: >- - If provided, will only return linked accounts associated with the - given integration name. - is_test_account: - type: optional - docs: >- - If included, will only include test linked accounts. If not - included, will only include non-test linked accounts. - page_size: - type: optional - docs: Number of results to return per page. - status: - type: optional - docs: >- - Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, - `RELINK_NEEDED` - response: - docs: '' - type: ticketingRoot.PaginatedAccountDetailsAndActionsList - status-code: 200 - examples: - - query-parameters: - category: accounting - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - end_user_email_address: end_user_email_address - end_user_organization_name: end_user_organization_name - end_user_origin_id: end_user_origin_id - end_user_origin_ids: end_user_origin_ids - id: id - ids: ids - include_duplicates: true - integration_name: integration_name - is_test_account: is_test_account - page_size: 1 - status: status - headers: - X-Account-Token: '[object Object]' - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: e59b1821-f85c-4e28-a6b3-1804156f3563 - category: hris - status: COMPLETE - status_detail: Invalid login credentials - end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d - end_user_organization_name: Foo Bar, LLC - end_user_email_address: hradmin@foobar.dev - subdomain: foobar - webhook_listener_url: >- - https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: true - integration: - name: name - categories: - - hris - color: color - slug: slug - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - account_type: PRODUCTION - completed_at: '2024-08-26T20:11:19Z' - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/passthrough.yml b/.mock/definition/Ticketing/passthrough.yml deleted file mode 100644 index c0968fafe..000000000 --- a/.mock/definition/Ticketing/passthrough.yml +++ /dev/null @@ -1,42 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /ticketing/v1/passthrough - method: POST - auth: - - tokenAuth: [] - docs: Pull data from an endpoint not currently supported by Merge. - source: - openapi: ticketing_v3.yml - request: - body: ticketingRoot.DataPassthroughRequest - content-type: application/json - response: - docs: '' - type: ticketingRoot.RemoteResponse - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - method: GET - path: /scooters - response: - body: - method: GET - path: /scooters - status: 200 - response: - key: value - response_headers: - X-Page-Token: value - response_type: JSON - headers: - EXTRA-HEADER: value - Authorization: - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/projects.yml b/.mock/definition/Ticketing/projects.yml deleted file mode 100644 index 8920b177e..000000000 --- a/.mock/definition/Ticketing/projects.yml +++ /dev/null @@ -1,253 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ticketing/v1/projects - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Project` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - request: - name: ProjectsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: ticketingRoot.PaginatedProjectList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Q1 Platform - description: For tracking all tasks related to Platform for Q1 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - retrieve: - path: /ticketing/v1/projects/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Project` object with the given `id`. - source: - openapi: ticketing_v3.yml - path-parameters: - id: string - request: - name: ProjectsRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: ticketingRoot.Project - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Q1 Platform - description: For tracking all tasks related to Platform for Q1 - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - data: - key: value - usersList: - path: /ticketing/v1/projects/{parent_id}/users - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `User` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - path-parameters: - parent_id: string - request: - name: ProjectsUsersListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: ticketingRoot.PaginatedUserList - status-code: 200 - examples: - - path-parameters: - parent_id: parent_id - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Gil Feig - email_address: help@merge.dev - is_active: true - teams: - - 28b54125-287f-494d-965e-3c5b330c9a68 - - 17a54124-287f-494d-965e-3c5b330c9a68 - roles: - - 23454124-387f-494d-265e-345b330c9123 - avatar: https://merge.dev/user_profile_pic.png - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - source: - openapi: ticketing_v3.yml -types: - ProjectsUsersListRequestExpandItem: - enum: - - roles - - teams - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/regenerateKey.yml b/.mock/definition/Ticketing/regenerateKey.yml deleted file mode 100644 index 054c3dc1c..000000000 --- a/.mock/definition/Ticketing/regenerateKey.yml +++ /dev/null @@ -1,39 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /ticketing/v1/regenerate-key - method: POST - auth: - - tokenAuth: [] - docs: Exchange remote keys. - source: - openapi: ticketing_v3.yml - request: - name: RemoteKeyForRegenerationRequest - body: - properties: - name: - type: string - docs: The name of the remote key - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: ticketingRoot.RemoteKey - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - request: - name: Remote Deployment Key 1 - response: - body: - name: Remote Deployment Key 1 - key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/roles.yml b/.mock/definition/Ticketing/roles.yml deleted file mode 100644 index 3067049b8..000000000 --- a/.mock/definition/Ticketing/roles.yml +++ /dev/null @@ -1,166 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ticketing/v1/roles - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Role` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - request: - name: RolesListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: ticketingRoot.PaginatedRoleList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 23454124-387f-494d-265e-345b330c9123 - remote_id: '123' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Member - ticket_actions: - - VIEW - - EDIT - - CREATE - ticket_access: ALL - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - retrieve: - path: /ticketing/v1/roles/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Role` object with the given `id`. - source: - openapi: ticketing_v3.yml - path-parameters: - id: string - request: - name: RolesRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: ticketingRoot.Role - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 23454124-387f-494d-265e-345b330c9123 - remote_id: '123' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Member - ticket_actions: - - VIEW - - EDIT - - CREATE - ticket_access: ALL - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - data: - key: value - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/scopes.yml b/.mock/definition/Ticketing/scopes.yml deleted file mode 100644 index 82bf8e0e8..000000000 --- a/.mock/definition/Ticketing/scopes.yml +++ /dev/null @@ -1,168 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - default_scopes_retrieve: - path: /ticketing/v1/default-scopes - method: GET - auth: - - tokenAuth: [] - docs: >- - Get the default permissions for Merge Common Models and fields across - all Linked Accounts of a given category. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - source: - openapi: ticketing_v3.yml - response: - docs: '' - type: ticketingRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: '[object Object]' - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - linked_account_scopes_retrieve: - path: /ticketing/v1/linked-account-scopes - method: GET - auth: - - tokenAuth: [] - docs: >- - Get all available permissions for Merge Common Models and fields for a - single Linked Account. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - source: - openapi: ticketing_v3.yml - response: - docs: '' - type: ticketingRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - linked_account_scopes_create: - path: /ticketing/v1/linked-account-scopes - method: POST - auth: - - tokenAuth: [] - docs: >- - Update permissions for any Common Model or field for a single Linked - Account. Any Scopes not set in this POST request will inherit the - default Scopes. [Learn - more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) - source: - openapi: ticketing_v3.yml - request: - name: LinkedAccountCommonModelScopeDeserializerRequest - body: - properties: - common_models: - docs: The common models you want to update the scopes for - type: >- - list - content-type: application/json - response: - docs: '' - type: ticketingRoot.CommonModelScopeApi - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - home_location - disabled_fields: - - work_location - - model_name: Benefit - model_permissions: - WRITE: - is_enabled: false - response: - body: - common_models: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/syncStatus.yml b/.mock/definition/Ticketing/syncStatus.yml deleted file mode 100644 index 335739ba2..000000000 --- a/.mock/definition/Ticketing/syncStatus.yml +++ /dev/null @@ -1,64 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ticketing/v1/sync-status - method: GET - auth: - - tokenAuth: [] - docs: >- - Get sync status for the current sync and the most recently finished - sync. `last_sync_start` represents the most recent time any sync began. - `last_sync_finished` represents the most recent time any sync completed. - These timestamps may correspond to different sync instances which may - result in a sync start time being later than a separate sync completed - time. To ensure you are retrieving the latest available data reference - the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. - Possible values for `status` and `last_sync_result` are `DISABLED`, - `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more - about sync status in our [Help - Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - request: - name: SyncStatusListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: ticketingRoot.PaginatedSyncStatusList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - model_name: Ticket - model_id: ticketing.Ticket - last_sync_start: '2021-03-30T19:44:18Z' - next_sync_start: '2021-03-30T20:44:18Z' - last_sync_result: SYNCING - last_sync_finished: '2021-03-30T19:55:18Z' - status: SYNCING - is_initial_sync: true - selective_sync_configurations_usage: IN_NEXT_SYNC - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/tags.yml b/.mock/definition/Ticketing/tags.yml deleted file mode 100644 index 69e5f0434..000000000 --- a/.mock/definition/Ticketing/tags.yml +++ /dev/null @@ -1,156 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ticketing/v1/tags - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Tag` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - request: - name: TagsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: ticketingRoot.PaginatedTagList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - id: 17a54124-287f-494d-965e-3c5b330c9a68 - name: Ticketing API - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - retrieve: - path: /ticketing/v1/tags/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Tag` object with the given `id`. - source: - openapi: ticketing_v3.yml - path-parameters: - id: string - request: - name: TagsRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: ticketingRoot.Tag - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - id: 17a54124-287f-494d-965e-3c5b330c9a68 - name: Ticketing API - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - data: - key: value - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/teams.yml b/.mock/definition/Ticketing/teams.yml deleted file mode 100644 index 9654bf8a4..000000000 --- a/.mock/definition/Ticketing/teams.yml +++ /dev/null @@ -1,158 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ticketing/v1/teams - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Team` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - request: - name: TeamsListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - response: - docs: '' - type: ticketingRoot.PaginatedTeamList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Platform - description: Platform and Integrations Team - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - retrieve: - path: /ticketing/v1/teams/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Team` object with the given `id`. - source: - openapi: ticketing_v3.yml - path-parameters: - id: string - request: - name: TeamsRetrieveRequest - query-parameters: - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: ticketingRoot.Team - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Platform - description: Platform and Integrations Team - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - data: - key: value - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/tickets.yml b/.mock/definition/Ticketing/tickets.yml deleted file mode 100644 index 76665b774..000000000 --- a/.mock/definition/Ticketing/tickets.yml +++ /dev/null @@ -1,1259 +0,0 @@ -types: - TicketsListRequestExpandItem: - enum: - - account - - assigned_teams - - assignees - - attachments - - collections - - contact - - creator - - parent_ticket - source: - openapi: ticketing_v3.yml - TicketsListRequestPriority: - enum: - - HIGH - - LOW - - NORMAL - - URGENT - source: - openapi: ticketing_v3.yml - TicketsListRequestRemoteFields: - enum: - - priority - - value: priority,status - name: PriorityStatus - - value: priority,status,ticket_type - name: PriorityStatusTicketType - - value: priority,ticket_type - name: PriorityTicketType - - status - - value: status,ticket_type - name: StatusTicketType - - ticket_type - source: - openapi: ticketing_v3.yml - TicketsListRequestShowEnumOrigins: - enum: - - priority - - value: priority,status - name: PriorityStatus - - value: priority,status,ticket_type - name: PriorityStatusTicketType - - value: priority,ticket_type - name: PriorityTicketType - - status - - value: status,ticket_type - name: StatusTicketType - - ticket_type - source: - openapi: ticketing_v3.yml - TicketsListRequestStatus: - enum: - - value: '' - name: EMPTY - - CLOSED - - IN_PROGRESS - - ON_HOLD - - OPEN - source: - openapi: ticketing_v3.yml - TicketsRetrieveRequestExpandItem: - enum: - - account - - assigned_teams - - assignees - - attachments - - collections - - contact - - creator - - parent_ticket - source: - openapi: ticketing_v3.yml - TicketsRetrieveRequestRemoteFields: - enum: - - priority - - value: priority,status - name: PriorityStatus - - value: priority,status,ticket_type - name: PriorityStatusTicketType - - value: priority,ticket_type - name: PriorityTicketType - - status - - value: status,ticket_type - name: StatusTicketType - - ticket_type - source: - openapi: ticketing_v3.yml - TicketsRetrieveRequestShowEnumOrigins: - enum: - - priority - - value: priority,status - name: PriorityStatus - - value: priority,status,ticket_type - name: PriorityStatusTicketType - - value: priority,ticket_type - name: PriorityTicketType - - status - - value: status,ticket_type - name: StatusTicketType - - ticket_type - source: - openapi: ticketing_v3.yml - TicketsViewersListRequestExpandItem: - enum: - - team - - user - source: - openapi: ticketing_v3.yml -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ticketing/v1/tickets - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `Ticket` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - request: - name: TicketsListRequest - query-parameters: - account_id: - type: optional - docs: If provided, will only return tickets for this account. - assignee_ids: - type: optional - docs: >- - If provided, will only return tickets assigned to the - assignee_ids; multiple assignee_ids can be separated by commas. - collection_ids: - type: optional - docs: >- - If provided, will only return tickets assigned to the - collection_ids; multiple collection_ids can be separated by - commas. - completed_after: - type: optional - docs: >- - If provided, will only return tickets completed after this - datetime. - completed_before: - type: optional - docs: >- - If provided, will only return tickets completed before this - datetime. - contact_id: - type: optional - docs: If provided, will only return tickets for this contact. - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - creator_id: - type: optional - docs: If provided, will only return tickets created by this creator_id. - creator_ids: - type: optional - docs: >- - If provided, will only return tickets created by the creator_ids; - multiple creator_ids can be separated by commas. - cursor: - type: optional - docs: The pagination cursor value. - due_after: - type: optional - docs: If provided, will only return tickets due after this datetime. - due_before: - type: optional - docs: If provided, will only return tickets due before this datetime. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - name: - type: optional - docs: If provided, will only return tickets with this name. - page_size: - type: optional - docs: Number of results to return per page. - parent_ticket_id: - type: optional - docs: If provided, will only return sub tickets of the parent_ticket_id. - priority: - type: optional - docs: |- - If provided, will only return tickets of this priority. - - * `URGENT` - URGENT - * `HIGH` - HIGH - * `NORMAL` - NORMAL - * `LOW` - LOW - remote_created_after: - type: optional - docs: >- - If provided, will only return tickets created in the third party - platform after this datetime. - remote_created_before: - type: optional - docs: >- - If provided, will only return tickets created in the third party - platform before this datetime. - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - remote_id: - type: optional - docs: The API provider's ID for the given object. - remote_updated_after: - type: optional - docs: >- - If provided, will only return tickets updated in the third party - platform after this datetime. - remote_updated_before: - type: optional - docs: >- - If provided, will only return tickets updated in the third party - platform before this datetime. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - status: - type: optional - docs: If provided, will only return tickets of this status. - tags: - type: optional - docs: >- - If provided, will only return tickets matching the tags; multiple - tags can be separated by commas. - ticket_type: - type: optional - docs: If provided, will only return tickets of this type. - ticket_url: - type: optional - docs: >- - If provided, will only return tickets where the URL matches or - contains the substring - validation: - format: uri - response: - docs: '' - type: ticketingRoot.PaginatedTicketList - status-code: 200 - examples: - - query-parameters: - account_id: account_id - assignee_ids: assignee_ids - collection_ids: collection_ids - completed_after: '2024-01-15T09:30:00Z' - completed_before: '2024-01-15T09:30:00Z' - contact_id: contact_id - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - creator_id: creator_id - creator_ids: creator_ids - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - due_after: '2024-01-15T09:30:00Z' - due_before: '2024-01-15T09:30:00Z' - include_deleted_data: true - include_remote_data: true - include_remote_fields: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - name: name - page_size: 1 - parent_ticket_id: parent_ticket_id - priority: HIGH - remote_created_after: '2024-01-15T09:30:00Z' - remote_created_before: '2024-01-15T09:30:00Z' - remote_fields: priority - remote_id: remote_id - remote_updated_after: '2024-01-15T09:30:00Z' - remote_updated_before: '2024-01-15T09:30:00Z' - show_enum_origins: priority - status: '' - tags: tags - ticket_type: ticket_type - ticket_url: ticket_url - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Please add more integrations - assignees: - - 17a54124-287f-494d-965e-3c5b330c9a68 - assigned_teams: - - 4857c306-c1f9-489e-a6b6-90902f736dfe - creator: creator - due_date: '2022-10-11T00:00:00Z' - status: OPEN - description: >- - Can you please add more integrations? It'll make syncing - data much easier! - collections: - - fb8c55b6-1cb8-4b4c-9fb6-17924231619d - ticket_type: incident - account: account - contact: contact - parent_ticket: parent_ticket - attachments: - - 42747df1-95e7-46e2-93cc-66f1191edca5 - - 92f972d0-2526-434b-9409-4c3b468e08f0 - access_level: COMPANY - tags: - - enterprise - - other-tag - roles: - - 21a54124-397f-494d-985e-3c5b330b8a68 - - 17a54124-287f-494d-965e-3c5b330c9a68 - ticket_url: https://thirdpartysoftware.com/project/3/issue/1 - priority: URGENT - remote_created_at: '2021-11-10T00:00:00Z' - remote_updated_at: '2021-12-09T00:00:00Z' - completed_at: '2021-12-09T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - remote_fields: - - remote_field_class: remote_field_class - create: - path: /ticketing/v1/tickets - method: POST - auth: - - tokenAuth: [] - docs: Creates a `Ticket` object with the given values. - source: - openapi: ticketing_v3.yml - request: - name: TicketEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: ticketingRoot.TicketRequest - content-type: application/json - response: - docs: '' - type: ticketingRoot.TicketResponse - status-code: 201 - examples: - - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Please add more integrations - assignees: - - 17a54124-287f-494d-965e-3c5b330c9a68 - assigned_teams: - - 4857c306-c1f9-489e-a6b6-90902f736dfe - creator: creator - due_date: '2022-10-11T00:00:00Z' - status: OPEN - description: >- - Can you please add more integrations? It'll make syncing data - much easier! - collections: - - fb8c55b6-1cb8-4b4c-9fb6-17924231619d - ticket_type: incident - account: account - contact: contact - parent_ticket: parent_ticket - attachments: - - 42747df1-95e7-46e2-93cc-66f1191edca5 - - 92f972d0-2526-434b-9409-4c3b468e08f0 - access_level: COMPANY - tags: - - enterprise - - other-tag - roles: - - 21a54124-397f-494d-985e-3c5b330b8a68 - - 17a54124-287f-494d-965e-3c5b330c9a68 - ticket_url: https://thirdpartysoftware.com/project/3/issue/1 - priority: URGENT - remote_created_at: '2021-11-10T00:00:00Z' - remote_updated_at: '2021-12-09T00:00:00Z' - completed_at: '2021-12-09T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - retrieve: - path: /ticketing/v1/tickets/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `Ticket` object with the given `id`. - source: - openapi: ticketing_v3.yml - path-parameters: - id: string - request: - name: TicketsRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_remote_fields: - type: optional - docs: >- - Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - remote_fields: - type: optional - docs: Deprecated. Use show_enum_origins. - show_enum_origins: - type: optional - docs: >- - A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized - enum values. [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - response: - docs: '' - type: ticketingRoot.Ticket - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_remote_fields: true - include_shell_data: true - remote_fields: priority - show_enum_origins: priority - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Please add more integrations - assignees: - - 17a54124-287f-494d-965e-3c5b330c9a68 - assigned_teams: - - 4857c306-c1f9-489e-a6b6-90902f736dfe - creator: creator - due_date: '2022-10-11T00:00:00Z' - status: OPEN - description: >- - Can you please add more integrations? It'll make syncing data - much easier! - collections: - - fb8c55b6-1cb8-4b4c-9fb6-17924231619d - ticket_type: incident - account: account - contact: contact - parent_ticket: parent_ticket - attachments: - - 42747df1-95e7-46e2-93cc-66f1191edca5 - - 92f972d0-2526-434b-9409-4c3b468e08f0 - access_level: COMPANY - tags: - - enterprise - - other-tag - roles: - - 21a54124-397f-494d-985e-3c5b330b8a68 - - 17a54124-287f-494d-965e-3c5b330c9a68 - ticket_url: https://thirdpartysoftware.com/project/3/issue/1 - priority: URGENT - remote_created_at: '2021-11-10T00:00:00Z' - remote_updated_at: '2021-12-09T00:00:00Z' - completed_at: '2021-12-09T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - data: - key: value - remote_fields: - - remote_field_class: remote_field_class - value: - key: value - partialUpdate: - path: /ticketing/v1/tickets/{id} - method: PATCH - auth: - - tokenAuth: [] - docs: Updates a `Ticket` object with the given `id`. - source: - openapi: ticketing_v3.yml - path-parameters: - id: string - request: - name: PatchedTicketEndpointRequest - query-parameters: - is_debug_mode: - type: optional - docs: >- - Whether to include debug fields (such as log file links) in the - response. - run_async: - type: optional - docs: Whether or not third-party updates should be run asynchronously. - body: - properties: - model: ticketingRoot.PatchedTicketRequest - content-type: application/json - response: - docs: '' - type: ticketingRoot.TicketResponse - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - is_debug_mode: true - run_async: true - headers: - X-Account-Token: X-Account-Token - request: - model: {} - response: - body: - model: - id: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Please add more integrations - assignees: - - 17a54124-287f-494d-965e-3c5b330c9a68 - assigned_teams: - - 4857c306-c1f9-489e-a6b6-90902f736dfe - creator: creator - due_date: '2022-10-11T00:00:00Z' - status: OPEN - description: >- - Can you please add more integrations? It'll make syncing data - much easier! - collections: - - fb8c55b6-1cb8-4b4c-9fb6-17924231619d - ticket_type: incident - account: account - contact: contact - parent_ticket: parent_ticket - attachments: - - 42747df1-95e7-46e2-93cc-66f1191edca5 - - 92f972d0-2526-434b-9409-4c3b468e08f0 - access_level: COMPANY - tags: - - enterprise - - other-tag - roles: - - 21a54124-397f-494d-985e-3c5b330b8a68 - - 17a54124-287f-494d-965e-3c5b330c9a68 - ticket_url: https://thirdpartysoftware.com/project/3/issue/1 - priority: URGENT - remote_created_at: '2021-11-10T00:00:00Z' - remote_updated_at: '2021-12-09T00:00:00Z' - completed_at: '2021-12-09T00:00:00Z' - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - remote_fields: - - remote_field_class: remote_field_class - warnings: - - source: - pointer: pointer - title: Unrecognized Field - detail: An unrecognized field, age, was passed in with request data. - problem_type: UNRECOGNIZED_FIELD - errors: - - source: - pointer: pointer - title: Missing Required Field - detail: custom_fields is a required field on model. - problem_type: MISSING_REQUIRED_FIELD - logs: - - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: >- - https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - viewersList: - path: /ticketing/v1/tickets/{ticket_id}/viewers - method: GET - auth: - - tokenAuth: [] - docs: >- - Returns a list of `Viewer` objects that point to a User id or Team id - that is either an assignee or viewer on a `Ticket` with the given id. - [Learn - more.](https://help.merge.dev/en/articles/10333658-ticketing-access-control-list-acls) - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - path-parameters: - ticket_id: string - request: - name: TicketsViewersListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: ticketingRoot.PaginatedViewerList - status-code: 200 - examples: - - path-parameters: - ticket_id: ticket_id - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - include_deleted_data: true - include_remote_data: true - include_shell_data: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: '088899' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - team: team - user: user - metaPatchRetrieve: - path: /ticketing/v1/tickets/meta/patch/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Ticket` PATCHs. - source: - openapi: ticketing_v3.yml - path-parameters: - id: string - response: - docs: '' - type: ticketingRoot.MetaResponse - status-code: 200 - examples: - - path-parameters: - id: id - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - metaPostRetrieve: - path: /ticketing/v1/tickets/meta/post - method: GET - auth: - - tokenAuth: [] - docs: Returns metadata for `Ticket` POSTs. - source: - openapi: ticketing_v3.yml - request: - name: TicketsMetaPostRetrieveRequest - query-parameters: - collection_id: - type: optional - docs: If provided, will only return tickets for this collection. - ticket_type: - type: optional - docs: If provided, will only return tickets for this ticket type. - response: - docs: '' - type: ticketingRoot.MetaResponse - status-code: 200 - examples: - - query-parameters: - collection_id: collection_id - ticket_type: ticket_type - headers: - X-Account-Token: X-Account-Token - response: - body: - request_schema: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - key: value - status: - linked_account_status: linked_account_status - can_make_request: true - has_conditional_params: true - has_required_linked_account_params: true - remoteFieldClassesList: - path: /ticketing/v1/tickets/remote-field-classes - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `RemoteFieldClass` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - request: - name: TicketsRemoteFieldClassesListRequest - query-parameters: - cursor: - type: optional - docs: The pagination cursor value. - ids: - type: optional - docs: >- - If provided, will only return remote field classes with the `ids` - in this list - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - is_common_model_field: - type: optional - docs: >- - If provided, will only return remote field classes with this - is_common_model_field value - is_custom: - type: optional - docs: >- - If provided, will only return remote fields classes with this - is_custom value - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: ticketingRoot.PaginatedRemoteFieldClassList - status-code: 200 - examples: - - query-parameters: - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - ids: ids - include_deleted_data: true - include_remote_data: true - include_shell_data: true - is_common_model_field: true - is_custom: true - page_size: 1 - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: id - display_name: display_name - remote_key_name: remote_key_name - description: description - is_custom: true - is_common_model_field: true - is_required: true - field_type: string - field_format: string - field_choices: - - {} - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/users.yml b/.mock/definition/Ticketing/users.yml deleted file mode 100644 index 8ab9181ef..000000000 --- a/.mock/definition/Ticketing/users.yml +++ /dev/null @@ -1,207 +0,0 @@ -types: - UsersListRequestExpandItem: - enum: - - roles - - teams - source: - openapi: ticketing_v3.yml - UsersRetrieveRequestExpandItem: - enum: - - roles - - teams - source: - openapi: ticketing_v3.yml -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ticketing/v1/users - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `User` objects. - pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - source: - openapi: ticketing_v3.yml - request: - name: UsersListRequest - query-parameters: - created_after: - type: optional - docs: If provided, will only return objects created after this datetime. - created_before: - type: optional - docs: >- - If provided, will only return objects created before this - datetime. - cursor: - type: optional - docs: The pagination cursor value. - email_address: - type: optional - docs: >- - If provided, will only return users with emails equal to this - value (case insensitive). - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_deleted_data: - type: optional - docs: >- - Indicates whether or not this object has been deleted in the third - party platform. Full coverage deletion detection is a premium - add-on. Native deletion detection is offered for free with limited - coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - modified_after: - type: optional - docs: >- - If provided, only objects synced by Merge after this date time - will be returned. - modified_before: - type: optional - docs: >- - If provided, only objects synced by Merge before this date time - will be returned. - page_size: - type: optional - docs: Number of results to return per page. - remote_id: - type: optional - docs: The API provider's ID for the given object. - team: - type: optional - docs: If provided, will only return users matching in this team. - response: - docs: '' - type: ticketingRoot.PaginatedUserList - status-code: 200 - examples: - - query-parameters: - created_after: '2024-01-15T09:30:00Z' - created_before: '2024-01-15T09:30:00Z' - cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - email_address: email_address - include_deleted_data: true - include_remote_data: true - include_shell_data: true - modified_after: '2024-01-15T09:30:00Z' - modified_before: '2024-01-15T09:30:00Z' - page_size: 1 - remote_id: remote_id - team: team - headers: - X-Account-Token: X-Account-Token - response: - body: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - id: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Gil Feig - email_address: help@merge.dev - is_active: true - teams: - - 28b54125-287f-494d-965e-3c5b330c9a68 - - 17a54124-287f-494d-965e-3c5b330c9a68 - roles: - - 23454124-387f-494d-265e-345b330c9123 - avatar: https://merge.dev/user_profile_pic.png - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - retrieve: - path: /ticketing/v1/users/{id} - method: GET - auth: - - tokenAuth: [] - docs: Returns a `User` object with the given `id`. - source: - openapi: ticketing_v3.yml - path-parameters: - id: string - request: - name: UsersRetrieveRequest - query-parameters: - expand: - type: optional - allow-multiple: true - docs: >- - Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - include_remote_data: - type: optional - docs: >- - Whether to include the original data Merge fetched from the - third-party to produce these models. - include_shell_data: - type: optional - docs: >- - Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - response: - docs: '' - type: ticketingRoot.User - status-code: 200 - examples: - - path-parameters: - id: id - query-parameters: - include_remote_data: true - include_shell_data: true - headers: - X-Account-Token: X-Account-Token - response: - body: - id: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: '19202938' - created_at: '2021-09-15T00:00:00Z' - modified_at: '2021-10-16T00:00:00Z' - name: Gil Feig - email_address: help@merge.dev - is_active: true - teams: - - 28b54125-287f-494d-965e-3c5b330c9a68 - - 17a54124-287f-494d-965e-3c5b330c9a68 - roles: - - 23454124-387f-494d-265e-345b330c9123 - avatar: https://merge.dev/user_profile_pic.png - remote_was_deleted: true - field_mappings: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - - path: /platform-endpoint - data: - key: value - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/webhookReceivers.yml b/.mock/definition/Ticketing/webhookReceivers.yml deleted file mode 100644 index 3a10d7758..000000000 --- a/.mock/definition/Ticketing/webhookReceivers.yml +++ /dev/null @@ -1,65 +0,0 @@ -imports: - ticketingRoot: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /ticketing/v1/webhook-receivers - method: GET - auth: - - tokenAuth: [] - docs: Returns a list of `WebhookReceiver` objects. - source: - openapi: ticketing_v3.yml - response: - docs: '' - type: list - status-code: 200 - examples: - - headers: - X-Account-Token: X-Account-Token - response: - body: - - event: event - is_active: true - key: key - create: - path: /ticketing/v1/webhook-receivers - method: POST - auth: - - tokenAuth: [] - docs: Creates a `WebhookReceiver` object with the given values. - source: - openapi: ticketing_v3.yml - request: - name: WebhookReceiverRequest - body: - properties: - event: - type: string - validation: - minLength: 1 - is_active: boolean - key: - type: optional - validation: - minLength: 1 - content-type: application/json - response: - docs: '' - type: ticketingRoot.WebhookReceiver - status-code: 201 - examples: - - headers: - X-Account-Token: X-Account-Token - request: - event: event - is_active: true - response: - body: - event: event - is_active: true - key: key - source: - openapi: ticketing_v3.yml diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml deleted file mode 100644 index 0967ef424..000000000 --- a/.mock/definition/__package__.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/.mock/definition/api.yml b/.mock/definition/api.yml deleted file mode 100644 index 062482b66..000000000 --- a/.mock/definition/api.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: api -error-discrimination: - strategy: status-code -display-name: Merge Accounting API -environments: - Production: https://api.merge.dev/api - Production_EU: https://api-eu.merge.dev/api - Sandbox: https://api-sandbox.merge.dev/api -default-environment: Production -default-url: api -headers: - X-Account-Token: - type: optional - name: accountToken - docs: Token identifying the end user. -auth-schemes: - BearerAuthScheme: - scheme: bearer - token: - name: api_key -auth: BearerAuthScheme diff --git a/.mock/fern.config.json b/.mock/fern.config.json deleted file mode 100644 index 9aef8fce9..000000000 --- a/.mock/fern.config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "organization" : "merge", - "version" : "0.83.0" -} \ No newline at end of file diff --git a/.mock/filestorage_v3.yml b/.mock/filestorage_v3.yml deleted file mode 100644 index 8ccd8e845..000000000 --- a/.mock/filestorage_v3.yml +++ /dev/null @@ -1,5574 +0,0 @@ -openapi: 3.0.3 -info: - title: Merge File Storage API - version: '1.0' - description: The unified API for building rich integrations with multiple File Storage - platforms. - contact: - name: Merge Team - url: https://www.merge.dev/ - email: hello@merge.dev -paths: - /filestorage/v1/account-details: - get: - operationId: account_details_retrieve - description: Get details for a linked account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - account-details - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AccountDetails' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/account-token/{public_token}: - get: - operationId: account_token_retrieve - description: Returns the account token for the end user with the provided public - token. - parameters: - - in: path - name: public_token - schema: - type: string - required: true - tags: - - account-token - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AccountToken' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/async-passthrough: - post: - operationId: async_passthrough_create - description: Asynchronously pull data from an endpoint not currently supported - by Merge. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - async-passthrough - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AsyncPassthroughReciept' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/async-passthrough/{async_passthrough_receipt_id}: - get: - operationId: async_passthrough_retrieve - description: Retrieves data from earlier async-passthrough POST request - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: async_passthrough_receipt_id - schema: - type: string - format: uuid - required: true - tags: - - async-passthrough - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/RemoteResponse' - - type: string - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/audit-trail: - get: - operationId: audit_trail_list - description: Gets a list of audit trail events. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_date - schema: - type: string - description: If included, will only include audit trail events that occurred - before this time - - in: query - name: event_type - schema: - type: string - description: 'If included, will only include events with the given event type. - Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, - `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, - `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, - `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, - `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, - `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, - `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, - `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, - `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, - `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`' - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: start_date - schema: - type: string - description: If included, will only include audit trail events that occurred - after this time - - in: query - name: user_email - schema: - type: string - description: If provided, this will return events associated with the specified - user email. Please note that the email address reflects the user's email - at the time of the event, and may not be their current email. - tags: - - audit-trail - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAuditLogEventList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/available-actions: - get: - operationId: available_actions_retrieve - description: Returns a list of models and actions available for an account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - available-actions - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AvailableActions' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/default-scopes: - get: - operationId: default_scopes_retrieve - description: Get the default permissions for Merge Common Models and fields - across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - tags: - - scopes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/delete-account: - post: - operationId: delete_account_delete - description: Delete a linked account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - delete-account - security: - - tokenAuth: [] - responses: - '200': - description: No response body - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/drives: - get: - operationId: drives_list - description: Returns a list of `Drive` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: name - schema: - type: string - nullable: true - description: If provided, will only return drives with this name. This performs - an exact match. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - drives - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedDriveList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/drives/{id}: - get: - operationId: drives_retrieve - description: Returns a `Drive` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - drives - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Drive' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/field-mappings: - get: - operationId: field_mappings_retrieve - description: Get all Field Mappings for this Linked Account. Field Mappings - are mappings between third-party Remote Fields and user defined Merge fields. - [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: exclude_remote_field_metadata - schema: - type: boolean - description: If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` - will be null). This will increase the speed of the request since these fields - require some calculations. - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingApiInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: field_mappings_create - description: Create new Field Mappings that will be available after the next - scheduled sync. This will cause the next sync for this Linked Account to sync - **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: exclude_remote_field_metadata - schema: - type: boolean - description: If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` - will be null). This will increase the speed of the request since these fields - require some calculations. - tags: - - field-mapping - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/field-mappings/{field_mapping_id}: - patch: - operationId: field_mappings_partial_update - description: Create or update existing Field Mappings for a Linked Account. - Changes will be reflected after the next scheduled sync. This will cause the - next sync for this Linked Account to sync **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: field_mapping_id - schema: - type: string - format: uuid - required: true - tags: - - field-mapping - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - delete: - operationId: field_mappings_destroy - description: Deletes Field Mappings for a Linked Account. All data related to - this Field Mapping will be deleted and these changes will be reflected after - the next scheduled sync. This will cause the next sync for this Linked Account - to sync **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: field_mapping_id - schema: - type: string - format: uuid - required: true - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '204': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/files: - get: - operationId: files_list - description: Returns a list of `File` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: drive_id - schema: - type: string - description: Specifying a drive id returns only the files in that drive. Specifying - null returns only the files outside the top-level drive. - examples: - DriveId: - summary: drive_id - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - drive - - folder - - permissions - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandPermissions,Folder,Drive: - value: permissions,folder,drive - summary: Expand Permissions, Folder, Drive - explode: false - - in: query - name: folder_id - schema: - type: string - description: Specifying a folder id returns only the files in that folder. - Specifying null returns only the files in root directory. - examples: - FolderId: - summary: folder_id - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: mime_type - schema: - type: string - description: If provided, will only return files with these mime_types. Multiple - values can be separated by commas. - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: name - schema: - type: string - nullable: true - description: If provided, will only return files with this name. This performs - an exact match. - - in: query - name: order_by - schema: - type: string - enum: - - -created_at - - -modified_at - - created_at - - modified_at - x-fern-enum: - -created_at: - name: CreatedAtDescending - created_at: - name: CreatedAtAscending - -modified_at: - name: ModifiedAtDescending - modified_at: - name: ModifiedAtAscending - description: 'Overrides the default ordering for this endpoint. Possible values - include: created_at, -created_at, modified_at, -modified_at.' - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - files - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedFileList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: files_create - description: Creates a `File` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - files - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FileStorageFileEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/FileStorageFileEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/FileStorageFileEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/FileStorageFileResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /filestorage/v1/files/{id}: - get: - operationId: files_retrieve - description: Returns a `File` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - drive - - folder - - permissions - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandPermissions,Folder,Drive: - value: permissions,folder,drive - summary: Expand Permissions, Folder, Drive - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - files - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/File' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/files/{id}/download: - get: - operationId: files_download_retrieve - description: Returns the `File` content with the given `id` as a stream of bytes. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: mime_type - schema: - type: string - description: If provided, specifies the export format of the file to be downloaded. - For information on supported export formats, please refer to our export format help center article. - tags: - - files - security: - - tokenAuth: [] - responses: - '200': - content: - application/octet-stream: - schema: - type: string - format: binary - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/files/{id}/download/request-meta: - get: - operationId: files_download_request_meta_retrieve - description: Returns metadata to construct an authenticated file download request - for a singular file, allowing you to download file directly from the third-party. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: mime_type - schema: - type: string - description: If provided, specifies the export format of the file to be downloaded. - For information on supported export formats, please refer to our export format help center article. - tags: - - files - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/DownloadRequestMeta' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/files/download/request-meta: - get: - operationId: files_download_request_meta_list - description: Returns metadata to construct authenticated file download requests, - allowing you to download files directly from the third-party. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: mime_types - schema: - type: string - description: A comma-separated list of preferred MIME types in order of priority. - If supported by the third-party provider, the file(s) will be returned in - the first supported MIME type from the list. The default MIME type is PDF. - To see supported MIME types by file type, refer to our export format help center article. - - in: query - name: modified_after - schema: - type: string - description: If provided, will only return objects modified after this datetime. - - in: query - name: modified_before - schema: - type: string - description: If provided, will only return objects modified before this datetime. - - in: query - name: order_by - schema: - type: string - enum: - - -created_at - - -modified_at - - created_at - - modified_at - x-fern-enum: - -created_at: - name: CreatedAtDescending - created_at: - name: CreatedAtAscending - -modified_at: - name: ModifiedAtDescending - modified_at: - name: ModifiedAtAscending - description: 'Overrides the default ordering for this endpoint. Possible values - include: created_at, -created_at, modified_at, -modified_at.' - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - files - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedDownloadRequestMetaList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/files/meta/post: - get: - operationId: files_meta_post_retrieve - description: Returns metadata for `FileStorageFile` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - files - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/folders: - get: - operationId: folders_list - description: Returns a list of `Folder` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: drive_id - schema: - type: string - description: If provided, will only return folders in this drive. - examples: - DriveId: - summary: drive_id - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - drive - - parent_folder - - permissions - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandPermissions,ParentFolder,Drive: - value: permissions,parent_folder,drive - summary: Expand Permissions, Parent_folder, Drive - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: name - schema: - type: string - nullable: true - description: If provided, will only return folders with this name. This performs - an exact match. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: parent_folder_id - schema: - type: string - description: If provided, will only return folders in this parent folder. - If null, will return folders in root directory. - examples: - ParentFolderId: - summary: parent_folder_id - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - folders - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedFolderList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: folders_create - description: Creates a `Folder` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - folders - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FileStorageFolderEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/FileStorageFolderEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/FileStorageFolderEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/FileStorageFolderResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /filestorage/v1/folders/{id}: - get: - operationId: folders_retrieve - description: Returns a `Folder` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - drive - - parent_folder - - permissions - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandPermissions,ParentFolder,Drive: - value: permissions,parent_folder,drive - summary: Expand Permissions, Parent_folder, Drive - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - folders - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Folder' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/folders/meta/post: - get: - operationId: folders_meta_post_retrieve - description: Returns metadata for `FileStorageFolder` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - folders - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/generate-key: - post: - operationId: generate_key_create - description: Create a remote key. - tags: - - generate-key - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKey' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/groups: - get: - operationId: groups_list - description: Returns a list of `Group` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - child_groups - - users - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandChildGroups: - value: child_groups - summary: Expand Child_groups - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - groups - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedGroupList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/groups/{id}: - get: - operationId: groups_retrieve - description: Returns a `Group` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - child_groups - - users - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandChildGroups: - value: child_groups - summary: Expand Child_groups - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - groups - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Group' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/issues: - get: - operationId: issues_list - description: Gets all issues for Organization. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: account_token - schema: - type: string - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_date - schema: - type: string - description: If included, will only include issues whose most recent action - occurred before this time - - in: query - name: end_user_organization_name - schema: - type: string - - in: query - name: first_incident_time_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose first incident time - was after this datetime. - - in: query - name: first_incident_time_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose first incident time - was before this datetime. - - in: query - name: include_muted - schema: - type: string - description: If true, will include muted issues - - in: query - name: integration_name - schema: - type: string - - in: query - name: last_incident_time_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose last incident time - was after this datetime. - - in: query - name: last_incident_time_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose last incident time - was before this datetime. - - in: query - name: linked_account_id - schema: - type: string - description: If provided, will only include issues pertaining to the linked - account passed in. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: start_date - schema: - type: string - description: If included, will only include issues whose most recent action - occurred after this time - - in: query - name: status - schema: - type: string - enum: - - ONGOING - - RESOLVED - description: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - tags: - - issues - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedIssueList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/issues/{id}: - get: - operationId: issues_retrieve - description: Get a specific issue. - parameters: - - in: path - name: id - schema: - type: string - format: uuid - required: true - tags: - - issues - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Issue' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/link-token: - post: - operationId: link_token_create - description: Creates a link token to be used when linking a new end user. - tags: - - link-token - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LinkToken' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/linked-account-scopes: - get: - operationId: linked_account_scopes_retrieve - description: Get all available permissions for Merge Common Models and fields - for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - scopes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: linked_account_scopes_create - description: Update permissions for any Common Model or field for a single Linked - Account. Any Scopes not set in this POST request will inherit the default - Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - scopes - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /filestorage/v1/linked-accounts: - get: - operationId: linked_accounts_list - description: List linked accounts for your organization. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: category - schema: - type: string - nullable: true - enum: - - accounting - - ats - - crm - - filestorage - - hris - - mktg - - ticketing - description: |- - Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` - - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_user_email_address - schema: - type: string - description: If provided, will only return linked accounts associated with - the given email address. - - in: query - name: end_user_organization_name - schema: - type: string - description: If provided, will only return linked accounts associated with - the given organization name. - - in: query - name: end_user_origin_id - schema: - type: string - description: If provided, will only return linked accounts associated with - the given origin ID. - - in: query - name: end_user_origin_ids - schema: - type: string - description: Comma-separated list of EndUser origin IDs, making it possible - to specify multiple EndUsers at once. - - in: query - name: id - schema: - type: string - format: uuid - - in: query - name: ids - schema: - type: string - description: Comma-separated list of LinkedAccount IDs, making it possible - to specify multiple LinkedAccounts at once. - - in: query - name: include_duplicates - schema: - type: boolean - description: If `true`, will include complete production duplicates of the - account specified by the `id` query parameter in the response. `id` must - be for a complete production linked account. - - in: query - name: integration_name - schema: - type: string - description: If provided, will only return linked accounts associated with - the given integration name. - - in: query - name: is_test_account - schema: - type: string - description: If included, will only include test linked accounts. If not included, - will only include non-test linked accounts. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: status - schema: - type: string - description: 'Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, - `RELINK_NEEDED`' - tags: - - linked-accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAccountDetailsAndActionsList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/passthrough: - post: - operationId: passthrough_create - description: Pull data from an endpoint not currently supported by Merge. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - passthrough - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/regenerate-key: - post: - operationId: regenerate_key_create - description: Exchange remote keys. - tags: - - regenerate-key - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKey' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/remote-fields: - get: - operationId: remote_fields_retrieve - description: Get all remote fields for a Linked Account. Remote fields are third-party - fields that are accessible after initial sync if remote_data is enabled. You - can use remote fields to override existing Merge fields or map a new Merge - field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: common_models - schema: - type: string - description: A comma seperated list of Common Model names. If included, will - only return Remote Fields for those Common Models. - - in: query - name: include_example_values - schema: - type: string - description: If true, will include example values, where available, for remote - fields in the 3rd party platform. These examples come from active data from - your customers. - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteFieldAPIResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/sync-status: - get: - operationId: sync_status_list - description: Get sync status for the current sync and the most recently finished - sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` - represents the most recent time any sync completed. These timestamps may correspond - to different sync instances which may result in a sync start time being later - than a separate sync completed time. To ensure you are retrieving the latest - available data reference the `last_sync_finished` timestamp where `last_sync_result` - is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, - `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about - sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - sync-status - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedSyncStatusList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/sync-status/resync: - post: - operationId: sync_status_resync_create - description: Force re-sync of all models. This endpoint is available for monthly, - quarterly, and highest sync frequency customers on the Professional or Enterprise - plans. Doing so will consume a sync credit for the relevant linked account. - Force re-syncs can also be triggered manually in the Merge Dashboard and is - available for all customers. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - force-resync - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SyncStatus' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/target-fields: - get: - operationId: target_fields_retrieve - description: Get all organization-wide Target Fields, this will not include - any Linked Account specific Target Fields. Organization-wide Target Fields - are additional fields appended to the Merge Common Model for all Linked Accounts - in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ExternalTargetFieldAPIResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/users: - get: - operationId: users_list - description: Returns a list of `User` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_me - schema: - type: string - description: If provided, will only return the user object for requestor. - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - users - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedUserList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/users/{id}: - get: - operationId: users_retrieve - description: Returns a `User` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - users - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /filestorage/v1/webhook-receivers: - get: - operationId: webhook_receivers_list - description: Returns a list of `WebhookReceiver` objects. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - webhook-receivers - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/WebhookReceiver' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: webhook_receivers_create - description: Creates a `WebhookReceiver` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - webhook-receivers - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookReceiver' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC -components: - schemas: - AccountDetails: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - integration: - type: string - readOnly: true - example: BambooHR - integration_slug: - type: string - readOnly: true - example: bamboohr - category: - oneOf: - - $ref: '#/components/schemas/CategoryEnum' - - type: string - nullable: true - example: hris - end_user_origin_id: - type: string - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - end_user_organization_name: - type: string - readOnly: true - example: Waystar Royco - end_user_email_address: - type: string - format: email - readOnly: true - example: kendall.roy@waystar-royco.com - status: - type: string - readOnly: true - example: COMPLETE - webhook_listener_url: - type: string - format: uri - readOnly: true - example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: - type: boolean - nullable: true - readOnly: true - description: Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test Linked - Accounts, incomplete Production Linked Accounts, and ignored duplicate - Production Linked Account sets. - example: true - account_type: - type: string - readOnly: true - example: PRODUCTION - completed_at: - type: string - format: date-time - nullable: true - description: The time at which account completes the linking flow. - example: '2024-08-26T20:11:19.277118Z' - x-merge-category: filestorage - AccountDetailsAndActions: - type: object - description: |- - # The LinkedAccount Object - ### Description - The `LinkedAccount` object is used to represent an end user's link with a specific integration. - - ### Usage Example - View a list of your organization's `LinkedAccount` objects. - properties: - id: - type: string - example: e59b1821-f85c-4e28-a6b3-1804156f3563 - category: - oneOf: - - $ref: '#/components/schemas/CategoryEnum' - - type: string - example: hris - status: - oneOf: - - $ref: '#/components/schemas/AccountDetailsAndActionsStatusEnum' - - type: string - example: INCOMPLETE - status_detail: - type: string - example: Invalid login credentials - end_user_origin_id: - type: string - example: 3ac95cde-6c7f-4eef-afec-be710b42308d - end_user_organization_name: - type: string - example: Foo Bar, LLC - end_user_email_address: - type: string - example: hradmin@foobar.dev - subdomain: - type: string - description: The tenant or domain the customer has provided access to. - example: foobar - webhook_listener_url: - type: string - example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: - type: boolean - nullable: true - description: Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test Linked - Accounts, incomplete Production Linked Accounts, and ignored duplicate - Production Linked Account sets. - example: true - integration: - $ref: '#/components/schemas/AccountDetailsAndActionsIntegration' - example: - name: SAP SuccessFactors - categories: - - hris - - ats - image: https://cdn.merge.dev/SuccessFactors_Logo.png - square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg - color: '#F6A704' - slug: sap-successfactors - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - account_type: - type: string - example: PRODUCTION - completed_at: - type: string - format: date-time - example: '2024-08-26T20:11:19.277118Z' - required: - - account_type - - completed_at - - end_user_email_address - - end_user_organization_name - - id - - status - - webhook_listener_url - x-merge-sample-json: '{"id": "e59b1821-f85c-4e28-a6b3-1804156f3563", "category": - "hris", "status": "INCOMPLETE", "status_detail": "Invalid login credentials", - "end_user_origin_id": "3ac95cde-6c7f-4eef-afec-be710b42308d", "end_user_organization_name": - "Foo Bar, LLC", "end_user_email_address": "hradmin@foobar.dev", "webhook_listener_url": - "https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4", - "is_duplicate": true, "integration": {"name": "SAP SuccessFactors", "categories": - ["hris", "ats"], "image": "https://cdn.merge.dev/SuccessFactors_Logo.png", - "square_image": "https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg", "color": - "#F6A704", "slug": "sap-successfactors", "passthrough_available": true, "available_model_operations": - [{"model_name": "Candidate", "available_operations": ["FETCH", "CREATE"], - "required_post_parameters": ["remote_user_id"], "supported_fields": ["first_name", - "last_name", "company", "title"]}]}}' - x-merge-category: filestorage - AccountDetailsAndActionsIntegration: - type: object - properties: - name: - type: string - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - image: - type: string - square_image: - type: string - color: - type: string - slug: - type: string - passthrough_available: - type: boolean - available_model_operations: - type: array - items: - $ref: '#/components/schemas/ModelOperation' - required: - - categories - - color - - name - - passthrough_available - - slug - x-merge-category: filestorage - AccountDetailsAndActionsStatusEnum: - enum: - - COMPLETE - - INCOMPLETE - - RELINK_NEEDED - - IDLE - type: string - description: |- - * `COMPLETE` - COMPLETE - * `INCOMPLETE` - INCOMPLETE - * `RELINK_NEEDED` - RELINK_NEEDED - * `IDLE` - IDLE - x-merge-category: filestorage - AccountIntegration: - type: object - properties: - name: - type: string - description: Company name. - abbreviated_name: - type: string - nullable: true - description: "Optional. This shortened name appears in places with limited - space, usually in conjunction with the platform's logo (e.g., Merge Link - menu).

Example: Workforce Now (in lieu of ADP Workforce Now), - SuccessFactors (in lieu of SAP SuccessFactors)" - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - description: Category or categories this integration belongs to. Multiple - categories should be comma separated, i.e. [ats, hris]. - readOnly: true - image: - type: string - format: uri - nullable: true - description: Company logo in rectangular shape. - square_image: - type: string - format: uri - nullable: true - description: Company logo in square shape. - color: - type: string - description: The color of this integration used for buttons and text throughout - the app and landing pages. Choose a darker, saturated color. - pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ - maxLength: 18 - slug: - type: string - readOnly: true - api_endpoints_to_documentation_urls: - type: object - additionalProperties: {} - description: "Mapping of API endpoints to documentation urls for support. - Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', - 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], - 'POST': []}" - webhook_setup_guide_url: - type: string - nullable: true - description: Setup guide URL for third party webhook creation. Exposed in - Merge Docs. - category_beta_status: - type: object - description: Category or categories this integration is in beta status for. - readOnly: true - required: - - name - x-merge-category: filestorage - AccountToken: - type: object - properties: - account_token: - type: string - example: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB - integration: - $ref: '#/components/schemas/AccountIntegration' - example: - name: SAP SuccessFactors - categories: - - hris - - ats - image: https://cdn.merge.dev/SuccessFactors_Logo.png - square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg - color: '#F6A704' - slug: sap-successfactors - id: - type: string - example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - required: - - account_token - - id - - integration - x-merge-category: filestorage - AdvancedMetadata: - type: object - properties: - id: - type: string - format: uuid - display_name: - type: string - description: - type: string - is_required: - type: boolean - is_custom: - type: boolean - field_choices: - type: array - items: {} - required: - - id - x-merge-category: filestorage - AsyncPassthroughReciept: - type: object - properties: - async_passthrough_receipt_id: - type: string - format: uuid - example: fd29020f-2695-445e-922e-dcd5e81903fd - required: - - async_passthrough_receipt_id - x-merge-category: filestorage - AuditLogEvent: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: b5ceea2a-7171-47ce-8090-165cfce5572c - user_name: - type: string - nullable: true - description: The User's full name at the time of this Event occurring. - maxLength: 200 - example: Gil Feig - user_email: - type: string - format: email - nullable: true - description: The User's email at the time of this Event occurring. - maxLength: 254 - example: hello@merge.dev - role: - oneOf: - - $ref: '#/components/schemas/RoleEnum' - - type: string - description: |- - Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. - - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - example: ADMIN - ip_address: - type: string - maxLength: 45 - example: 192.0.2.123 - event_type: - oneOf: - - $ref: '#/components/schemas/EventTypeEnum' - - type: string - description: |- - Designates the type of event that occurred. - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - * `INVITED_USER` - INVITED_USER - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - * `CREATED_DESTINATION` - CREATED_DESTINATION - * `DELETED_DESTINATION` - DELETED_DESTINATION - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - * `CHANGED_SCOPES` - CHANGED_SCOPES - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - * `RESET_PASSWORD` - RESET_PASSWORD - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - * `MUTED_ISSUE` - MUTED_ISSUE - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - example: CHANGED_SCOPES - event_description: - type: string - example: Organization-wide Scopes for model hris.Employee updated from Read - to Read+Write - created_at: - type: string - format: date-time - readOnly: true - required: - - event_description - - event_type - - ip_address - - role - x-merge-category: filestorage - AvailableActions: - type: object - description: |- - # The AvailableActions Object - ### Description - The `Activity` object is used to see all available model/operation combinations for an integration. - - ### Usage Example - Fetch all the actions available for the `Zenefits` integration. - properties: - integration: - $ref: '#/components/schemas/AccountIntegration' - example: - name: Lever - categories: - - ats - image: https://merge-api-production.s3.amazonaws.com/media/Lever_Logo.png - square_image: https://merge-api-production.s3.amazonaws.com/media/Lever_Square_Logo.png - color: '#262A34' - is_in_beta: 'true' - api_endpoints_to_documentation_urls: "{'GET': [('/common-model-scopes', - 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve')], - 'POST': []}" - passthrough_available: - type: boolean - example: true - available_model_operations: - type: array - items: - $ref: '#/components/schemas/ModelOperation' - example: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - required: - - integration - - passthrough_available - x-merge-category: filestorage - CategoriesEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - type: string - description: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - x-merge-category: filestorage - CategoryEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - type: string - description: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - x-merge-category: filestorage - CommonModelScopeAPI: - type: object - properties: - common_models: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializer' - description: The common models you want to update the scopes for - example: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - required: - - common_models - x-merge-category: filestorage - CommonModelScopesBodyRequest: - type: object - properties: - model_id: - type: string - minLength: 1 - example: hris.Employee - enabled_actions: - type: array - items: - $ref: '#/components/schemas/EnabledActionsEnum' - example: - - READ - - WRITE - disabled_fields: - type: array - items: - type: string - minLength: 1 - example: - - first_name - required: - - disabled_fields - - enabled_actions - - model_id - x-merge-category: filestorage - CreateFieldMappingRequest: - type: object - properties: - target_field_name: - type: string - minLength: 1 - description: The name of the target field you want this remote field to - map to. - example: example_target_field_name - target_field_description: - type: string - minLength: 1 - description: The description of the target field you want this remote field - to map to. - example: this is a example description of the target field - remote_field_traversal_path: - type: array - items: {} - description: The field traversal path of the remote field listed when you - hit the GET /remote-fields endpoint. - example: - - example_remote_field - remote_method: - type: string - minLength: 1 - description: The method of the remote endpoint where the remote field is - coming from. - example: GET - remote_url_path: - type: string - minLength: 1 - description: The path of the remote endpoint where the remote field is coming - from. - example: /example-url-path - common_model_name: - type: string - minLength: 1 - description: The name of the Common Model that the remote field corresponds - to in a given category. - example: ExampleCommonModel - required: - - common_model_name - - remote_field_traversal_path - - remote_method - - remote_url_path - - target_field_description - - target_field_name - x-merge-category: filestorage - DataPassthroughRequest: - type: object - description: |- - # The DataPassthrough Object - ### Description - The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. - - ### Usage Example - Create a `DataPassthrough` to get team hierarchies from your Rippling integration. - properties: - method: - allOf: - - $ref: '#/components/schemas/MethodEnum' - example: POST - path: - type: string - minLength: 1 - description: The path of the request in the third party's platform. - example: /scooters - base_url_override: - type: string - nullable: true - minLength: 1 - description: An optional override of the third party's base url for the - request. - example: https://api.example.com - data: - type: string - nullable: true - minLength: 1 - description: The data with the request. You must include a `request_format` - parameter matching the data's format - example: '{"company": "Lime", "model": "Gen 2.5"}' - multipart_form_data: - type: array - items: - $ref: '#/components/schemas/MultipartFormFieldRequest' - nullable: true - description: Pass an array of `MultipartFormField` objects in here instead - of using the `data` param if `request_format` is set to `MULTIPART`. - headers: - type: object - additionalProperties: {} - nullable: true - description: The headers to use for the request (Merge will handle the account's - authorization headers). `Content-Type` header is required for passthrough. - Choose content type corresponding to expected format of receiving server. - example: - EXTRA-HEADER: value - request_format: - allOf: - - $ref: '#/components/schemas/RequestFormatEnum' - nullable: true - example: JSON - normalize_response: - type: boolean - description: 'Optional. If true, the response will always be an object of - the form `{"type": T, "value": ...}` where `T` will be one of `string, - boolean, number, null, array, object`.' - required: - - method - - path - x-merge-category: filestorage - DebugModeLog: - type: object - properties: - log_id: - type: string - example: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: - type: string - example: https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - $ref: '#/components/schemas/DebugModelLogSummary' - example: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - required: - - dashboard_view - - log_id - - log_summary - x-merge-sample-json: '{"log_id": "99433219-8017-4acd-bb3c-ceb23d663832", "dashboard_view": - "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832", "log_summary": - {"url": "www.exampleintegration.com/api/v1/exampleapi", "method": "POST", - "status_code": 200}}' - x-merge-category: filestorage - DebugModelLogSummary: - type: object - properties: - url: - type: string - example: www.exampleintegration.com/api/v1/exampleapi - method: - type: string - example: POST - status_code: - type: integer - example: 200 - required: - - method - - status_code - - url - x-merge-sample-json: '{"url": "www.exampleintegration.com/api/v1/exampleapi", - "method": "POST", "status_code": 200}' - x-merge-category: filestorage - DownloadRequestMeta: - type: object - properties: - id: - type: string - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - url: - type: string - example: https://www.googleapis.com/drive/v3/files/234?alt=media - method: - type: string - example: GET - headers: - type: object - additionalProperties: {} - example: - Authorization: Bearer 1234 - required: - - headers - - id - - method - - url - x-merge-category: filestorage - Drive: - type: object - description: |- - # The Drive Object - ### Description - The `Drive` object is used to represent a drive that contains the folders and files in the user's workspace. - ### Usage Example - Fetch from the `GET /api/filestorage/v1/drives` endpoint and view their drives. - properties: - id: - type: string - format: uuid - readOnly: true - example: f9e3d315-d6c2-458e-85c4-fa773d6ff4a6 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '2039348' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The drive's name. - maxLength: 254 - example: My Drive - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's drive was created. - drive_url: - type: string - nullable: true - description: The drive's url. - maxLength: 2000 - example: https://drive.com/drives/2039349 - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /drives - data: - - Varies by platform - x-merge-category: filestorage - EnabledActionsEnum: - enum: - - READ - - WRITE - type: string - description: |- - * `READ` - READ - * `WRITE` - WRITE - x-merge-category: filestorage - EncodingEnum: - enum: - - RAW - - BASE64 - - GZIP_BASE64 - type: string - description: |- - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - x-merge-category: filestorage - EndUserDetailsRequest: - type: object - properties: - end_user_email_address: - type: string - minLength: 1 - description: Your end user's email address. This is purely for identification - purposes - setting this value will not cause any emails to be sent. - maxLength: 100 - example: example@gmail.com - end_user_organization_name: - type: string - minLength: 1 - description: Your end user's organization. - maxLength: 100 - example: Test Organization - end_user_origin_id: - type: string - minLength: 1 - description: This unique identifier typically represents the ID for your - end user in your product's database. This value must be distinct from - other Linked Accounts' unique identifiers. - maxLength: 100 - example: '12345' - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - description: The integration categories to show in Merge Link. - example: - - hris - - ats - integration: - type: string - nullable: true - minLength: 1 - description: The slug of a specific pre-selected integration for this linking - flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. - example: bamboohr - link_expiry_mins: - type: integer - maximum: 10080 - minimum: 30 - default: 30 - description: An integer number of minutes between [30, 720 or 10080 if for - a Magic Link URL] for how long this token is valid. Defaults to 30. - should_create_magic_link_url: - type: boolean - nullable: true - default: false - description: Whether to generate a Magic Link URL. Defaults to false. For - more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - hide_admin_magic_link: - type: boolean - nullable: true - default: false - description: Whether to generate a Magic Link URL on the Admin Needed screen - during the linking flow. Defaults to false. For more information on Magic - Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - common_models: - type: array - items: - $ref: '#/components/schemas/CommonModelScopesBodyRequest' - nullable: true - description: An array of objects to specify the models and fields that will - be disabled for a given Linked Account. Each object uses model_id, enabled_actions, - and disabled_fields to specify the model, method, and fields that are - scoped for a given Linked Account. - category_common_model_scopes: - type: object - additionalProperties: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' - nullable: true - description: When creating a Link Token, you can set permissions for Common - Models that will apply to the account that is going to be linked. Any - model or field not specified in link token payload will default to existing - settings. - example: - hris: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - field_permissions: - enabled_fields: - - first_name - - last_name - - personal_email - disabled_fields: - - preferred_name - - model_name: Employment - model_permissions: - READ: - is_enabled: false - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - effective_date - ats: - - model_name: Job - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - field_permissions: - enabled_fields: - - name - disabled_fields: - - description - - model_name: Department - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - language: - oneOf: - - $ref: '#/components/schemas/LanguageEnum' - - type: string - nullable: true - description: |- - The following subset of IETF language tags can be used to configure localization. - - * `en` - en - * `de` - de - example: en - are_syncs_disabled: - type: boolean - nullable: true - default: false - description: The boolean that indicates whether initial, periodic, and force - syncs will be disabled. - integration_specific_config: - type: object - additionalProperties: {} - nullable: true - description: A JSON object containing integration-specific configuration - options. - example: - rippling: - oauth_code: 3h1jj8ssdf31dfji3o1jjdfjasd - required: - - categories - - end_user_email_address - - end_user_organization_name - - end_user_origin_id - x-merge-category: filestorage - ErrorValidationProblem: - type: object - properties: - source: - $ref: '#/components/schemas/ValidationProblemSource' - example: - pointer: /model/custom_fields - title: - type: string - example: Missing Required Field - detail: - type: string - example: custom_fields is a required field on model. - problem_type: - type: string - example: MISSING_REQUIRED_FIELD - required: - - detail - - problem_type - - title - x-merge-category: filestorage - EventTypeEnum: - enum: - - CREATED_REMOTE_PRODUCTION_API_KEY - - DELETED_REMOTE_PRODUCTION_API_KEY - - CREATED_TEST_API_KEY - - DELETED_TEST_API_KEY - - REGENERATED_PRODUCTION_API_KEY - - REGENERATED_WEBHOOK_SIGNATURE - - INVITED_USER - - TWO_FACTOR_AUTH_ENABLED - - TWO_FACTOR_AUTH_DISABLED - - DELETED_LINKED_ACCOUNT - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - CREATED_DESTINATION - - DELETED_DESTINATION - - CHANGED_DESTINATION - - CHANGED_SCOPES - - CHANGED_PERSONAL_INFORMATION - - CHANGED_ORGANIZATION_SETTINGS - - ENABLED_INTEGRATION - - DISABLED_INTEGRATION - - ENABLED_CATEGORY - - DISABLED_CATEGORY - - CHANGED_PASSWORD - - RESET_PASSWORD - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - FORCED_LINKED_ACCOUNT_RESYNC - - MUTED_ISSUE - - GENERATED_MAGIC_LINK - - ENABLED_MERGE_WEBHOOK - - DISABLED_MERGE_WEBHOOK - - MERGE_WEBHOOK_TARGET_CHANGED - - END_USER_CREDENTIALS_ACCESSED - type: string - description: |- - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - * `INVITED_USER` - INVITED_USER - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - * `CREATED_DESTINATION` - CREATED_DESTINATION - * `DELETED_DESTINATION` - DELETED_DESTINATION - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - * `CHANGED_SCOPES` - CHANGED_SCOPES - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - * `RESET_PASSWORD` - RESET_PASSWORD - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - * `MUTED_ISSUE` - MUTED_ISSUE - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - x-merge-category: filestorage - ExternalTargetFieldAPI: - type: object - properties: - name: - type: string - nullable: true - readOnly: true - example: example_target_field_name - description: - type: string - nullable: true - readOnly: true - example: this is a example description of a target field - is_mapped: - type: string - nullable: true - readOnly: true - example: true - x-merge-category: filestorage - ExternalTargetFieldAPIResponse: - type: object - properties: - File: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Folder: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Drive: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Group: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - User: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - x-merge-category: filestorage - FieldMappingApiInstance: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: - type: boolean - readOnly: true - target_field: - type: object - properties: - name: - type: string - description: - type: string - is_organization_wide: - type: boolean - required: - - description - - is_organization_wide - - name - nullable: true - readOnly: true - example: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - type: object - properties: - remote_key_name: - type: string - nullable: true - schema: - type: object - additionalProperties: {} - nullable: true - remote_endpoint_info: - type: object - properties: - method: - type: string - nullable: true - url_path: - type: string - nullable: true - field_traversal_path: - type: array - items: - type: string - nullable: true - required: - - field_traversal_path - - method - - url_path - required: - - remote_endpoint_info - - remote_key_name - - schema - nullable: true - readOnly: true - example: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - x-merge-category: filestorage - FieldMappingApiInstanceResponse: - type: object - properties: - File: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Folder: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Drive: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Group: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - User: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - x-merge-category: filestorage - FieldMappingInstanceResponse: - type: object - properties: - model: - $ref: '#/components/schemas/FieldMappingApiInstance' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: filestorage - FieldPermissionDeserializer: - type: object - properties: - enabled_fields: - type: array - items: {} - disabled_fields: - type: array - items: {} - x-merge-category: filestorage - FieldPermissionDeserializerRequest: - type: object - properties: - enabled_fields: - type: array - items: {} - disabled_fields: - type: array - items: {} - x-merge-category: filestorage - File: - type: object - description: |- - # The File Object - ### Description - The `File` object is used to represent a file in the workspace. The Object typically exists under a folder or drive, if it exists. - ### Usage Example - Fetch from the `GET /api/filestorage/v1/files` endpoint and view their files. - properties: - id: - type: string - format: uuid - readOnly: true - example: 45ce474c-dhcj-43a6-754r-629f799f7d68 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '12' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The file's name. - maxLength: 254 - example: merge_file_storage_launch.docx - file_url: - type: string - nullable: true - description: The URL to access the file. - maxLength: 2000 - example: https://drive.com/1234 - file_thumbnail_url: - type: string - nullable: true - description: The URL that produces a thumbnail preview of the file. Typically - an image. - maxLength: 2000 - example: https://drive.com/1234/thumbnail.png - size: - type: integer - maximum: 9223372036854776000 - minimum: -9223372036854776000 - format: int64 - nullable: true - description: The file's size, in bytes. - example: 254 - mime_type: - type: string - nullable: true - description: The file's mime type. - maxLength: 128 - example: application/vnd.openxmlformats-officedocument.wordprocessingml.document - description: - type: string - nullable: true - description: The file's description. - maxLength: 2000 - example: Use common model scopes to redact data returned in Merge's Common - Models! - folder: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Folder' - nullable: true - description: The folder that the file belongs to. - example: 8e889422-e086-42dc-b99e-24d732039b0b - x-merge-expands-to: Folder - checksum: - type: object - additionalProperties: {} - nullable: true - description: This field stores file checksum data. 'type' indicates the - algorithm (e.g. crc_32, sha1, sha256, quickXor, or md5), and 'content_hash' - is the unique hash used to verify file integrity and detect alterations. - example: - type: sha256 - content_hash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - permissions: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Permission' - - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Permission' - description: The Permission object is used to represent a user's or group's - access to a File or Folder. Permissions are unexpanded by default. Use - the query param `expand=permissions` to see more details under `GET /files`. - example: - - id: 31ce489c-asdf-68b1-754r-629f799f7123 - remote_id: '102895' - created_at: '2020-03-31T00:00:00Z' - modified_at: '2020-06-20T00:00:00Z' - user: 21ce474c-asdf-34a2-754r-629f799f7d12 - group: - type: USER - roles: - - OWNER - remote_data: - - id: 2ea7db93-1ae9-4686-82c9-35c768000736 - remote_id: - created_at: '2020-03-31T00:00:00Z' - modified_at: '2020-06-20T00:00:00Z' - user: - group: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - type: GROUP - roles: - - READ - remote_data: - x-merge-expands-to: Permission - drive: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Drive' - nullable: true - description: The drive that the file belongs to. - example: 204ca79c-0c86-4f6c-9ca6-61b946a4708a - x-merge-expands-to: Drive - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's file was created. - example: '2022-02-02T00:00:00Z' - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's file was updated. - example: '2022-02-03T00:00:00Z' - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /files - data: - - Varies by platform - x-merge-sdk-classname-alias: FileStorageFile - x-merge-sdk-classname-original: File - x-merge-expands: '{"drive": "Drive", "folder": "Folder", "permissions": "Permission"}' - x-merge-category: filestorage - FileRequest: - type: object - description: |- - # The File Object - ### Description - The `File` object is used to represent a file in the workspace. The Object typically exists under a folder or drive, if it exists. - ### Usage Example - Fetch from the `GET /api/filestorage/v1/files` endpoint and view their files. - properties: - name: - type: string - nullable: true - description: The file's name. - maxLength: 254 - example: merge_file_storage_launch.docx - file_url: - type: string - nullable: true - description: The URL to access the file. - maxLength: 2000 - example: https://drive.com/1234 - file_thumbnail_url: - type: string - nullable: true - description: The URL that produces a thumbnail preview of the file. Typically - an image. - maxLength: 2000 - example: https://drive.com/1234/thumbnail.png - size: - type: integer - maximum: 9223372036854776000 - minimum: -9223372036854776000 - format: int64 - nullable: true - description: The file's size, in bytes. - example: 254 - mime_type: - type: string - nullable: true - description: The file's mime type. - maxLength: 128 - example: application/vnd.openxmlformats-officedocument.wordprocessingml.document - description: - type: string - nullable: true - description: The file's description. - maxLength: 2000 - example: Use common model scopes to redact data returned in Merge's Common - Models! - folder: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Folder' - nullable: true - description: The folder that the file belongs to. - example: 8e889422-e086-42dc-b99e-24d732039b0b - x-merge-expands-to: Folder - checksum: - type: object - additionalProperties: {} - nullable: true - description: This field stores file checksum data. 'type' indicates the - algorithm (e.g. crc_32, sha1, sha256, quickXor, or md5), and 'content_hash' - is the unique hash used to verify file integrity and detect alterations. - example: - type: sha256 - content_hash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - permissions: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PermissionRequest' - - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PermissionRequest' - description: The Permission object is used to represent a user's or group's - access to a File or Folder. Permissions are unexpanded by default. Use - the query param `expand=permissions` to see more details under `GET /files`. - example: - - id: 31ce489c-asdf-68b1-754r-629f799f7123 - remote_id: '102895' - created_at: '2020-03-31T00:00:00Z' - modified_at: '2020-06-20T00:00:00Z' - user: 21ce474c-asdf-34a2-754r-629f799f7d12 - group: - type: USER - roles: - - OWNER - remote_data: - - id: 2ea7db93-1ae9-4686-82c9-35c768000736 - remote_id: - created_at: '2020-03-31T00:00:00Z' - modified_at: '2020-06-20T00:00:00Z' - user: - group: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - type: GROUP - roles: - - READ - remote_data: - x-merge-expands-to: Permission - drive: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Drive' - nullable: true - description: The drive that the file belongs to. - example: 204ca79c-0c86-4f6c-9ca6-61b946a4708a - x-merge-expands-to: Drive - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-sdk-classname-alias: FileStorageFile - x-merge-sdk-classname-original: File - x-merge-expands: '{"drive": "Drive", "folder": "Folder", "permissions": "Permission"}' - x-merge-category: filestorage - FileStorageFileEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/FileRequest' - required: - - model - x-merge-category: filestorage - FileStorageFileResponse: - type: object - properties: - model: - $ref: '#/components/schemas/File' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: filestorage - FileStorageFolderEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/FolderRequest' - required: - - model - x-merge-category: filestorage - FileStorageFolderResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Folder' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: filestorage - Folder: - type: object - description: |- - # The Folder Object - ### Description - The `Folder` object is used to represent a collection of files and/or folders in the workspace. Could be within a drive, if it exists. - ### Usage Example - Fetch from the `GET /api/filestorage/v1/folders` endpoint and view their folders. - properties: - id: - type: string - format: uuid - readOnly: true - example: e021f7a7-74fc-4487-8e12-14180c92d3b7 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '14' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The folder's name. - maxLength: 254 - example: R&D - folder_url: - type: string - nullable: true - description: The URL to access the folder. - maxLength: 2000 - example: https://drive.com/1234 - size: - type: integer - maximum: 9223372036854776000 - minimum: -9223372036854776000 - format: int64 - nullable: true - description: The folder's size, in bytes. - example: 2738000 - description: - type: string - nullable: true - description: The folder's description. - maxLength: 2000 - example: All things R&D related at Merge! - parent_folder: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Folder' - nullable: true - description: The folder that the folder belongs to. - example: 47ce474c-asdf-34a2-754r-629f799f7d31 - x-merge-expands-to: Folder - drive: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Drive' - nullable: true - description: The drive that the folder belongs to. - example: 31ce474c-asdf-34a2-754r-629f799f7d12 - x-merge-expands-to: Drive - permissions: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Permission' - - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Permission' - description: The Permission object is used to represent a user's or group's - access to a File or Folder. Permissions are unexpanded by default. Use - the query param `expand=permissions` to see more details under `GET /folders`. - example: - - id: 105b9265-0d52-4e5c-bb88-0cb681ec77f6 - remote_id: '102895' - created_at: '2020-03-31T00:00:00Z' - modified_at: '2020-06-20T00:00:00Z' - user: 21ce474c-asdf-34a2-754r-629f799f7d12 - group: - type: USER - roles: - - OWNER - remote_data: - - id: a77ac1b4-a04f-4baa-a388-de3c0c173e1c - remote_id: - created_at: '2020-03-31T00:00:00Z' - modified_at: '2020-06-20T00:00:00Z' - user: - group: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - type: GROUP - roles: - - READ - remote_data: - x-merge-expands-to: Permission - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's folder was created. - example: '2024-02-02T00:00:00Z' - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's folder was updated. - example: '2024-06-10T00:00:00Z' - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /folders - data: - - Varies by platform - x-merge-expands: '{"drive": "Drive", "parent_folder": "Folder", "permissions": - "Permission"}' - x-merge-category: filestorage - FolderRequest: - type: object - description: |- - # The Folder Object - ### Description - The `Folder` object is used to represent a collection of files and/or folders in the workspace. Could be within a drive, if it exists. - ### Usage Example - Fetch from the `GET /api/filestorage/v1/folders` endpoint and view their folders. - properties: - name: - type: string - nullable: true - description: The folder's name. - maxLength: 254 - example: R&D - folder_url: - type: string - nullable: true - description: The URL to access the folder. - maxLength: 2000 - example: https://drive.com/1234 - size: - type: integer - maximum: 9223372036854776000 - minimum: -9223372036854776000 - format: int64 - nullable: true - description: The folder's size, in bytes. - example: 2738000 - description: - type: string - nullable: true - description: The folder's description. - maxLength: 2000 - example: All things R&D related at Merge! - parent_folder: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Folder' - nullable: true - description: The folder that the folder belongs to. - example: 47ce474c-asdf-34a2-754r-629f799f7d31 - x-merge-expands-to: Folder - drive: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Drive' - nullable: true - description: The drive that the folder belongs to. - example: 31ce474c-asdf-34a2-754r-629f799f7d12 - x-merge-expands-to: Drive - permissions: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PermissionRequest' - - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PermissionRequest' - description: The Permission object is used to represent a user's or group's - access to a File or Folder. Permissions are unexpanded by default. Use - the query param `expand=permissions` to see more details under `GET /folders`. - example: - - id: 105b9265-0d52-4e5c-bb88-0cb681ec77f6 - remote_id: '102895' - created_at: '2020-03-31T00:00:00Z' - modified_at: '2020-06-20T00:00:00Z' - user: 21ce474c-asdf-34a2-754r-629f799f7d12 - group: - type: USER - roles: - - OWNER - remote_data: - - id: a77ac1b4-a04f-4baa-a388-de3c0c173e1c - remote_id: - created_at: '2020-03-31T00:00:00Z' - modified_at: '2020-06-20T00:00:00Z' - user: - group: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - type: GROUP - roles: - - READ - remote_data: - x-merge-expands-to: Permission - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"drive": "Drive", "parent_folder": "Folder", "permissions": - "Permission"}' - x-merge-category: filestorage - GenerateRemoteKeyRequest: - type: object - description: |- - # The GenerateRemoteKey Object - ### Description - The `GenerateRemoteKey` object is used to represent a request for a new remote key. - - ### Usage Example - Post a `GenerateRemoteKey` to create a new remote key. - properties: - name: - type: string - minLength: 1 - description: The name of the remote key - example: Remote Deployment Key 1 - required: - - name - x-merge-category: filestorage - Group: - type: object - description: |- - # The Group Object - ### Description - The `Group` object is used to represent any subset of `Users`. This can extend to company domains as well. - ### Usage Example - Fetch from the `GET /api/filestorage/v1/groups` endpoint and view their groups. - properties: - id: - type: string - format: uuid - readOnly: true - example: 5624aceb-0ea2-4864-ba08-354ac56b9884 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The group's name. - maxLength: 254 - example: Administrators - users: - type: array - items: - type: string - format: uuid - description: The users that belong in the group. If null, this typically - means it's either a domain or the third-party platform does not surface - this information. - example: - - 6e93361b-8ae7-444b-bfa2-71206cbbee24 - child_groups: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Group' - readOnly: true - description: Groups that inherit the permissions of the parent group. - example: - - a1f90b3c-633d-404e-a696-05cd54808676 - x-merge-expands-to: Group - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /groups - data: - - Varies by platform - required: - - users - x-merge-expands: '{"child_groups": "Group"}' - x-merge-category: filestorage - IndividualCommonModelScopeDeserializer: - type: object - properties: - model_name: - type: string - model_permissions: - type: object - additionalProperties: - $ref: '#/components/schemas/ModelPermissionDeserializer' - field_permissions: - $ref: '#/components/schemas/FieldPermissionDeserializer' - required: - - model_name - x-merge-category: filestorage - IndividualCommonModelScopeDeserializerRequest: - type: object - properties: - model_name: - type: string - minLength: 1 - model_permissions: - type: object - additionalProperties: - $ref: '#/components/schemas/ModelPermissionDeserializerRequest' - field_permissions: - $ref: '#/components/schemas/FieldPermissionDeserializerRequest' - required: - - model_name - x-merge-category: filestorage - Issue: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: - oneOf: - - $ref: '#/components/schemas/IssueStatusEnum' - - type: string - description: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - example: ONGOING - error_description: - type: string - example: Missing Permissions - end_user: - type: object - additionalProperties: {} - readOnly: true - example: b82302de-852e-4e60-b050-edf9da3b7c02 - first_incident_time: - type: string - format: date-time - nullable: true - example: '2022-12-05T16:19:15.161Z' - last_incident_time: - type: string - format: date-time - nullable: true - example: '2022-12-05T16:19:15.161Z' - is_muted: - type: boolean - readOnly: true - example: true - error_details: - type: array - items: - type: string - readOnly: true - example: - - Missing employee permissions. - - Missing time off permissions. - required: - - error_description - x-merge-category: filestorage - IssueStatusEnum: - enum: - - ONGOING - - RESOLVED - type: string - description: |- - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - x-merge-category: filestorage - LanguageEnum: - enum: - - en - - de - type: string - description: |- - * `en` - en - * `de` - de - x-merge-category: filestorage - LastSyncResultEnum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - type: string - description: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - x-merge-category: filestorage - LinkToken: - type: object - properties: - link_token: - type: string - example: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 - integration_name: - type: string - example: Lever - magic_link_url: - type: string - example: https://link.merge.dev/asdfjkl12345jsndfgi2i83n - required: - - link_token - x-merge-category: filestorage - LinkedAccountCommonModelScopeDeserializerRequest: - type: object - properties: - common_models: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' - description: The common models you want to update the scopes for - example: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - home_location - disabled_fields: - - work_location - - model_name: Benefit - model_permissions: - WRITE: - is_enabled: false - required: - - common_models - x-merge-category: filestorage - LinkedAccountStatus: - type: object - properties: - linked_account_status: - type: string - can_make_request: - type: boolean - required: - - can_make_request - - linked_account_status - x-merge-category: filestorage - MetaResponse: - type: object - properties: - request_schema: - type: object - additionalProperties: {} - example: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - type: object - additionalProperties: {} - status: - $ref: '#/components/schemas/LinkedAccountStatus' - example: - linked_account_status: COMPLETE - can_make_request: true - has_conditional_params: - type: boolean - has_required_linked_account_params: - type: boolean - required: - - has_conditional_params - - has_required_linked_account_params - - request_schema - x-merge-category: filestorage - MethodEnum: - enum: - - GET - - OPTIONS - - HEAD - - POST - - PUT - - PATCH - - DELETE - type: string - description: |- - * `GET` - GET - * `OPTIONS` - OPTIONS - * `HEAD` - HEAD - * `POST` - POST - * `PUT` - PUT - * `PATCH` - PATCH - * `DELETE` - DELETE - x-merge-category: filestorage - ModelOperation: - type: object - description: |- - # The ModelOperation Object - ### Description - The `ModelOperation` object is used to represent the operations that are currently supported for a given model. - - ### Usage Example - View what operations are supported for the `Candidate` endpoint. - properties: - model_name: - type: string - example: Candidate - available_operations: - type: array - items: - type: string - example: - - FETCH - - CREATE - required_post_parameters: - type: array - items: - type: string - example: - - remote_user_id - supported_fields: - type: array - items: - type: string - example: - - first_name - - last_name - - company - - title - required: - - available_operations - - model_name - - required_post_parameters - - supported_fields - x-merge-category: filestorage - ModelPermissionDeserializer: - type: object - properties: - is_enabled: - type: boolean - x-merge-category: filestorage - ModelPermissionDeserializerRequest: - type: object - properties: - is_enabled: - type: boolean - x-merge-category: filestorage - MultipartFormFieldRequest: - type: object - description: |- - # The MultipartFormField Object - ### Description - The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. - - ### Usage Example - Create a `MultipartFormField` to define a multipart form entry. - properties: - name: - type: string - minLength: 1 - description: The name of the form field - example: resume - data: - type: string - minLength: 1 - description: The data for the form field. - example: SW50ZWdyYXRlIGZhc3QKSW50ZWdyYXRlIG9uY2U= - encoding: - oneOf: - - $ref: '#/components/schemas/EncodingEnum' - - type: string - nullable: true - default: RAW - description: |- - The encoding of the value of `data`. Defaults to `RAW` if not defined. - - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - example: BASE64 - file_name: - type: string - nullable: true - minLength: 1 - description: The file name of the form field, if the field is for a file. - example: resume.pdf - content_type: - type: string - nullable: true - minLength: 1 - description: The MIME type of the file, if the field is for a file. - example: application/pdf - required: - - data - - name - x-merge-category: filestorage - PaginatedAccountDetailsAndActionsList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/AccountDetailsAndActions' - x-merge-category: filestorage - PaginatedAuditLogEventList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/AuditLogEvent' - x-merge-category: filestorage - PaginatedDownloadRequestMetaList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/DownloadRequestMeta' - x-merge-category: filestorage - PaginatedDriveList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Drive' - x-merge-category: filestorage - PaginatedFileList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/File' - x-merge-category: filestorage - PaginatedFolderList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Folder' - x-merge-category: filestorage - PaginatedGroupList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Group' - x-merge-category: filestorage - PaginatedIssueList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Issue' - x-merge-category: filestorage - PaginatedSyncStatusList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/SyncStatus' - x-merge-category: filestorage - PaginatedUserList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/User' - x-merge-category: filestorage - PatchedEditFieldMappingRequest: - type: object - properties: - remote_field_traversal_path: - type: array - items: {} - description: The field traversal path of the remote field listed when you - hit the GET /remote-fields endpoint. - example: - - example_remote_field_name - remote_method: - type: string - minLength: 1 - description: The method of the remote endpoint where the remote field is - coming from. - example: GET - remote_url_path: - type: string - minLength: 1 - description: The path of the remote endpoint where the remote field is coming - from. - example: /example-url-path - x-merge-category: filestorage - Permission: - type: object - description: |- - # The Permission Object - ### Description - The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. - - ### Usage Example - Fetch from the `GET Files` or `GET Folders` endpoint. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details. - properties: - id: - type: string - format: uuid - readOnly: true - example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '340' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - user: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The user that is granted this permission. This will only be - populated if the type is `USER`. - example: 755e0a8e-1c04-444b-980f-51b1c0bdde8a - x-merge-expands-to: User - group: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Group' - nullable: true - description: The group that is granted this permission. This will only be - populated if the type is `GROUP`. - x-merge-expands-to: Group - type: - oneOf: - - $ref: '#/components/schemas/TypeEnum' - - type: string - nullable: true - description: |- - Denotes what type of people have access to the file. - - * `USER` - USER - * `GROUP` - GROUP - * `COMPANY` - COMPANY - * `ANYONE` - ANYONE - example: USER - roles: - type: array - items: - oneOf: - - $ref: '#/components/schemas/RolesEnum' - - type: string - nullable: true - description: |- - The permissions that the user or group has for the File or Folder. - - * `READ` - READ - * `WRITE` - WRITE - * `OWNER` - OWNER - nullable: true - description: 'The permissions that the user or group has for the File or - Folder. It is possible for a user or group to have multiple roles, such - as viewing & uploading. Possible values include: `READ`, `WRITE`, `OWNER`. - In cases where there is no clear mapping, the original value passed through - will be returned.' - example: - - OWNER - x-merge-nested-write-allowed: true - x-merge-expands: '{"group": "Group", "primary_file": "File", "primary_folder": - "Folder", "user": "User"}' - x-merge-category: filestorage - PermissionRequest: - type: object - description: |- - # The Permission Object - ### Description - The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. - - ### Usage Example - Fetch from the `GET Files` or `GET Folders` endpoint. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details. - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '340' - user: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The user that is granted this permission. This will only be - populated if the type is `USER`. - example: 755e0a8e-1c04-444b-980f-51b1c0bdde8a - x-merge-expands-to: User - group: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Group' - nullable: true - description: The group that is granted this permission. This will only be - populated if the type is `GROUP`. - x-merge-expands-to: Group - type: - oneOf: - - $ref: '#/components/schemas/TypeEnum' - - type: string - nullable: true - description: |- - Denotes what type of people have access to the file. - - * `USER` - USER - * `GROUP` - GROUP - * `COMPANY` - COMPANY - * `ANYONE` - ANYONE - example: USER - roles: - type: array - items: - oneOf: - - $ref: '#/components/schemas/RolesEnum' - - type: string - nullable: true - description: |- - The permissions that the user or group has for the File or Folder. - - * `READ` - READ - * `WRITE` - WRITE - * `OWNER` - OWNER - nullable: true - description: 'The permissions that the user or group has for the File or - Folder. It is possible for a user or group to have multiple roles, such - as viewing & uploading. Possible values include: `READ`, `WRITE`, `OWNER`. - In cases where there is no clear mapping, the original value passed through - will be returned.' - example: - - OWNER - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"group": "Group", "primary_file": "File", "primary_folder": - "Folder", "user": "User"}' - x-merge-category: filestorage - RemoteData: - type: object - description: |- - # The RemoteData Object - ### Description - The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. - - ### Usage Example - TODO - properties: - path: - type: string - description: The third-party API path that is being called. - example: /platform-endpoint - data: - readOnly: true - description: The data returned from the third-party for this object in its - original, unnormalized format. - example: - - Varies by platform - required: - - path - x-merge-category: filestorage - RemoteEndpointInfo: - type: object - properties: - method: - type: string - example: GET - url_path: - type: string - example: /example-url-path - field_traversal_path: - type: array - items: {} - example: - - example_key_name - required: - - field_traversal_path - - method - - url_path - x-merge-category: filestorage - RemoteFieldAPI: - type: object - properties: - schema: - type: object - additionalProperties: {} - example: - type: string - remote_key_name: - type: string - example: example_remote_key_name - remote_endpoint_info: - $ref: '#/components/schemas/RemoteEndpointInfo' - example: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - type: array - items: {} - nullable: true - example: - - example - advanced_metadata: - allOf: - - $ref: '#/components/schemas/AdvancedMetadata' - nullable: true - coverage: - oneOf: - - type: integer - - type: number - format: double - nullable: true - readOnly: true - example: 0.33 - required: - - advanced_metadata - - remote_endpoint_info - - remote_key_name - - schema - x-merge-category: filestorage - RemoteFieldAPIResponse: - type: object - properties: - File: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Folder: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Drive: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Group: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - User: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - x-merge-category: filestorage - RemoteKey: - type: object - description: |- - # The RemoteKey Object - ### Description - The `RemoteKey` object is used to represent a request for a new remote key. - - ### Usage Example - Post a `GenerateRemoteKey` to receive a new `RemoteKey`. - properties: - name: - type: string - example: Remote Deployment Key 1 - key: - type: string - example: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - required: - - key - - name - x-merge-category: filestorage - RemoteKeyForRegenerationRequest: - type: object - description: |- - # The RemoteKeyForRegeneration Object - ### Description - The `RemoteKeyForRegeneration` object is used to exchange an old remote key for a new one - - ### Usage Example - Post a `RemoteKeyForRegeneration` to swap out an old remote key for a new one - properties: - name: - type: string - minLength: 1 - description: The name of the remote key - example: Remote Deployment Key 1 - required: - - name - x-merge-category: filestorage - RemoteResponse: - type: object - description: |- - # The RemoteResponse Object - ### Description - The `RemoteResponse` object is used to represent information returned from a third-party endpoint. - - ### Usage Example - View the `RemoteResponse` returned from your `DataPassthrough`. - properties: - method: - type: string - example: GET - path: - type: string - example: /scooters - status: - type: integer - example: 200 - response: - example: - scooters: - - company: Lime - model: Gen 2.5 - - company: Bird - model: Bird Zero - response_headers: - type: object - additionalProperties: {} - example: - X-Page-Token: value - response_type: - oneOf: - - $ref: '#/components/schemas/ResponseTypeEnum' - - type: string - example: JSON - headers: - type: object - additionalProperties: {} - example: - EXTRA-HEADER: value - Authorization: - required: - - method - - path - - response - - status - x-merge-category: filestorage - RequestFormatEnum: - enum: - - JSON - - XML - - MULTIPART - type: string - description: |- - * `JSON` - JSON - * `XML` - XML - * `MULTIPART` - MULTIPART - x-merge-category: filestorage - ResponseTypeEnum: - enum: - - JSON - - BASE64_GZIP - type: string - description: |- - * `JSON` - JSON - * `BASE64_GZIP` - BASE64_GZIP - x-merge-category: filestorage - RoleEnum: - enum: - - ADMIN - - DEVELOPER - - MEMBER - - API - - SYSTEM - - MERGE_TEAM - type: string - description: |- - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - x-merge-category: filestorage - RolesEnum: - enum: - - READ - - WRITE - - OWNER - type: string - description: |- - * `READ` - READ - * `WRITE` - WRITE - * `OWNER` - OWNER - x-merge-category: filestorage - SelectiveSyncConfigurationsUsageEnum: - enum: - - IN_NEXT_SYNC - - IN_LAST_SYNC - type: string - description: |- - * `IN_NEXT_SYNC` - IN_NEXT_SYNC - * `IN_LAST_SYNC` - IN_LAST_SYNC - x-merge-category: filestorage - StatusFd5Enum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - type: string - description: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - x-merge-category: filestorage - SyncStatus: - type: object - description: |- - # The SyncStatus Object - ### Description - The `SyncStatus` object is used to represent the syncing state of an account - - ### Usage Example - View the `SyncStatus` for an account to see how recently its models were synced. - properties: - model_name: - type: string - example: File - model_id: - type: string - example: filestorage.FileStorageFile - last_sync_start: - type: string - format: date-time - example: '2021-03-30T19:44:18.695973Z' - next_sync_start: - type: string - format: date-time - example: '2021-03-30T20:44:18.662942Z' - last_sync_result: - oneOf: - - $ref: '#/components/schemas/LastSyncResultEnum' - - type: string - example: DONE - last_sync_finished: - type: string - format: date-time - example: '2021-03-30T19:55:18.695973Z' - status: - oneOf: - - $ref: '#/components/schemas/StatusFd5Enum' - - type: string - example: SYNCING - is_initial_sync: - type: boolean - example: true - selective_sync_configurations_usage: - $ref: '#/components/schemas/SelectiveSyncConfigurationsUsageEnum' - required: - - is_initial_sync - - model_id - - model_name - - status - x-merge-sample-json: '{"model_name": "Candidate", "model_id": "ats.Candidate", - "last_sync_start": "2021-03-30T19:44:18.695973Z", "next_sync_start": "2021-03-30T20:44:18.662942Z", - "status": "SYNCING", "is_initial_sync": true}' - x-merge-category: filestorage - TypeEnum: - enum: - - USER - - GROUP - - COMPANY - - ANYONE - type: string - description: |- - * `USER` - USER - * `GROUP` - GROUP - * `COMPANY` - COMPANY - * `ANYONE` - ANYONE - x-merge-category: filestorage - User: - type: object - description: |- - # The User Object - ### Description - The `User` object is used to represent a user within the File Storage account. - ### Usage Example - Fetch from the `GET /api/filestorage/v1/users` endpoint and view their users. - properties: - id: - type: string - format: uuid - readOnly: true - example: 83902e75-4362-4803-b76c-a7d6be292cbd - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '2039349' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The user's name. - maxLength: 254 - example: Gil Feig - email_address: - type: string - nullable: true - description: The user's email address. This is typically used to identify - a user across linked accounts. - maxLength: 2000 - example: hello@merge.dev - is_me: - type: boolean - description: Whether the user is the one who linked this account. - example: true - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /users - data: - - Varies by platform - x-merge-expands: '{"roles": "Role", "teams": "Team"}' - x-merge-category: filestorage - ValidationProblemSource: - type: object - properties: - pointer: - type: string - required: - - pointer - x-merge-category: filestorage - WarningValidationProblem: - type: object - properties: - source: - $ref: '#/components/schemas/ValidationProblemSource' - example: - pointer: /age - title: - type: string - example: Unrecognized Field - detail: - type: string - example: An unrecognized field, age, was passed in with request data. - problem_type: - type: string - example: UNRECOGNIZED_FIELD - required: - - detail - - problem_type - - title - x-merge-category: filestorage - WebhookReceiver: - type: object - properties: - event: - type: string - is_active: - type: boolean - key: - type: string - required: - - event - - is_active - x-merge-category: filestorage - WebhookReceiverRequest: - type: object - properties: - event: - type: string - minLength: 1 - is_active: - type: boolean - key: - type: string - minLength: 1 - required: - - event - - is_active - x-merge-category: filestorage - securitySchemes: - tokenAuth: - type: http - scheme: bearer - description: Token-based authentication with required prefix "Bearer" - x-fern-token-variable-name: api_key -servers: -- url: https://api.merge.dev/api/filestorage/v1 - description: Production - x-fern-server-name: Production -- url: https://api-sandbox.merge.dev/api/filestorage/v1 - description: Sandbox - x-fern-server-name: Sandbox -- url: https://api-eu.merge.dev/api/filestorage/v1 - description: Production EU - x-fern-server-name: ProductionEU -- url: https://api-ap.merge.dev/api/filestorage/v1 - description: Production APSE1 - x-fern-server-name: ProductionAPSE1 diff --git a/.mock/hris_v3.yml b/.mock/hris_v3.yml deleted file mode 100644 index 0efa7fe6f..000000000 --- a/.mock/hris_v3.yml +++ /dev/null @@ -1,12079 +0,0 @@ -openapi: 3.0.3 -info: - title: Merge HRIS API - version: '1.0' - description: The unified API for building rich integrations with multiple HR Information - System platforms. - contact: - name: Merge Team - url: https://www.merge.dev/ - email: hello@merge.dev -paths: - /hris/v1/account-details: - get: - operationId: account_details_retrieve - description: Get details for a linked account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - account-details - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AccountDetails' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/account-token/{public_token}: - get: - operationId: account_token_retrieve - description: Returns the account token for the end user with the provided public - token. - parameters: - - in: path - name: public_token - schema: - type: string - required: true - tags: - - account-token - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AccountToken' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/async-passthrough: - post: - operationId: async_passthrough_create - description: Asynchronously pull data from an endpoint not currently supported - by Merge. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - async-passthrough - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AsyncPassthroughReciept' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/async-passthrough/{async_passthrough_receipt_id}: - get: - operationId: async_passthrough_retrieve - description: Retrieves data from earlier async-passthrough POST request - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: async_passthrough_receipt_id - schema: - type: string - format: uuid - required: true - tags: - - async-passthrough - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/RemoteResponse' - - type: string - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/audit-trail: - get: - operationId: audit_trail_list - description: Gets a list of audit trail events. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_date - schema: - type: string - description: If included, will only include audit trail events that occurred - before this time - - in: query - name: event_type - schema: - type: string - description: 'If included, will only include events with the given event type. - Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, - `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, - `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, - `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, - `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, - `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, - `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, - `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, - `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`' - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: start_date - schema: - type: string - description: If included, will only include audit trail events that occurred - after this time - - in: query - name: user_email - schema: - type: string - description: If provided, this will return events associated with the specified - user email. Please note that the email address reflects the user's email - at the time of the event, and may not be their current email. - tags: - - audit-trail - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAuditLogEventList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/available-actions: - get: - operationId: available_actions_retrieve - description: Returns a list of models and actions available for an account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - available-actions - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AvailableActions' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/bank-info: - get: - operationId: bank_info_list - description: Returns a list of `BankInfo` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: account_type - schema: - type: string - nullable: true - enum: - - CHECKING - - SAVINGS - description: |- - If provided, will only return BankInfo's with this account type. Options: ('SAVINGS', 'CHECKING') - - * `SAVINGS` - SAVINGS - * `CHECKING` - CHECKING - - in: query - name: bank_name - schema: - type: string - nullable: true - description: If provided, will only return BankInfo's with this bank name. - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: employee_id - schema: - type: string - description: If provided, will only return bank accounts for this employee. - examples: - EmployeeId: - summary: employee_id - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - employee - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandEmployee: - value: employee - summary: Expand Employee - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: order_by - schema: - type: string - enum: - - -remote_created_at - - remote_created_at - x-fern-enum: - -remote_created_at: - name: RemoteCreatedAtDescending - remote_created_at: - name: RemoteCreatedAtAscending - description: 'Overrides the default ordering for this endpoint. Possible values - include: remote_created_at, -remote_created_at.' - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - account_type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesAccountType: - value: account_type - summary: Original Enum Values Account_type - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - account_type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesAccountType: - value: account_type - summary: Original Enum Values Account_type - tags: - - bank-info - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedBankInfoList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/bank-info/{id}: - get: - operationId: bank_info_retrieve - description: Returns a `BankInfo` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - employee - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandEmployee: - value: employee - summary: Expand Employee - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - account_type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesAccountType: - value: account_type - summary: Original Enum Values Account_type - - in: query - name: show_enum_origins - schema: - type: string - enum: - - account_type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesAccountType: - value: account_type - summary: Original Enum Values Account_type - tags: - - bank-info - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/BankInfo' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/benefits: - get: - operationId: benefits_list - description: Returns a list of `Benefit` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: employee_id - schema: - type: string - description: If provided, will return the benefits associated with the employee. - examples: - EmployeeId: - summary: employee_id - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - employee - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandEmployee: - value: employee - summary: Expand Employee - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - benefits - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedBenefitList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/benefits/{id}: - get: - operationId: benefits_retrieve - description: Returns a `Benefit` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - employee - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandEmployee: - value: employee - summary: Expand Employee - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - benefits - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Benefit' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/companies: - get: - operationId: companies_list - description: Returns a list of `Company` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - companies - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedCompanyList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/companies/{id}: - get: - operationId: companies_retrieve - description: Returns a `Company` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - companies - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Company' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/default-scopes: - get: - operationId: default_scopes_retrieve - description: Get the default permissions for Merge Common Models and fields - across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - tags: - - scopes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/delete-account: - post: - operationId: delete_account_delete - description: Delete a linked account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - delete-account - security: - - tokenAuth: [] - responses: - '200': - description: No response body - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/dependents: - get: - operationId: dependents_list - description: Returns a list of `Dependent` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_sensitive_fields - schema: - type: boolean - description: Whether to include sensitive fields (such as social security - numbers) in the response. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - dependents - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedDependentList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /hris/v1/dependents/{id}: - get: - operationId: dependents_retrieve - description: Returns a `Dependent` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_sensitive_fields - schema: - type: boolean - description: Whether to include sensitive fields (such as social security - numbers) in the response. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - dependents - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Dependent' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /hris/v1/employee-payroll-runs: - get: - operationId: employee_payroll_runs_list - description: Returns a list of `EmployeePayrollRun` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: employee_id - schema: - type: string - description: If provided, will only return employee payroll runs for this - employee. - examples: - EmployeeId: - summary: employee_id - - in: query - name: ended_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return employee payroll runs ended after - this datetime. - - in: query - name: ended_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return employee payroll runs ended before - this datetime. - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - employee - - payroll_run - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandEmployee,PayrollRun: - value: employee,payroll_run - summary: Expand Employee, Payroll_run - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: payroll_run_id - schema: - type: string - description: If provided, will only return employee payroll runs for this - employee. - examples: - PayrollRunId: - summary: payroll_run_id - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: started_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return employee payroll runs started after - this datetime. - - in: query - name: started_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return employee payroll runs started before - this datetime. - tags: - - employee-payroll-runs - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedEmployeePayrollRunList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /hris/v1/employee-payroll-runs/{id}: - get: - operationId: employee_payroll_runs_retrieve - description: Returns an `EmployeePayrollRun` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - employee - - payroll_run - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandEmployee,PayrollRun: - value: employee,payroll_run - summary: Expand Employee, Payroll_run - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - employee-payroll-runs - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/EmployeePayrollRun' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /hris/v1/employees: - get: - operationId: employees_list - description: Returns a list of `Employee` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: company_id - schema: - type: string - description: If provided, will only return employees for this company. - examples: - CompanyId: - summary: company_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: display_full_name - schema: - type: string - nullable: true - description: If provided, will only return employees with this display name. - - in: query - name: employment_status - schema: - type: string - nullable: true - enum: - - ACTIVE - - INACTIVE - - PENDING - description: |- - If provided, will only return employees with this employment status. - - * `ACTIVE` - ACTIVE - * `PENDING` - PENDING - * `INACTIVE` - INACTIVE - - in: query - name: employment_type - schema: - type: string - description: If provided, will only return employees that have an employment - of the specified employment_type. - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - - employments - - groups - - home_location - - manager - - pay_group - - team - - work_location - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandEmployments,Groups,HomeLocation,WorkLocation,Manager,Team,Company,PayGroup: - value: employments,groups,home_location,work_location,manager,team,company,pay_group - summary: Expand Employments, Groups, Home_location, Work_location, Manager, - Team, Company, Pay_group - explode: false - - in: query - name: first_name - schema: - type: string - nullable: true - description: If provided, will only return employees with this first name. - - in: query - name: groups - schema: - type: string - description: If provided, will only return employees matching the group ids; - multiple groups can be separated by commas. - - in: query - name: home_location_id - schema: - type: string - description: If provided, will only return employees for this home location. - examples: - HomeLocationId: - summary: home_location_id - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_sensitive_fields - schema: - type: boolean - description: Whether to include sensitive fields (such as social security - numbers) in the response. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: job_title - schema: - type: string - description: If provided, will only return employees that have an employment - of the specified job_title. - - in: query - name: last_name - schema: - type: string - nullable: true - description: If provided, will only return employees with this last name. - - in: query - name: manager_id - schema: - type: string - description: If provided, will only return employees for this manager. - examples: - ManagerId: - summary: manager_id - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: pay_group_id - schema: - type: string - description: If provided, will only return employees for this pay group - examples: - PayGroupId: - summary: pay_group_id - - in: query - name: personal_email - schema: - type: string - format: email - nullable: true - description: If provided, will only return Employees with this personal email - - in: query - name: remote_fields - schema: - type: string - enum: - - employment_status - - employment_status,ethnicity - - employment_status,ethnicity,gender - - employment_status,ethnicity,gender,marital_status - - employment_status,ethnicity,marital_status - - employment_status,gender - - employment_status,gender,marital_status - - employment_status,marital_status - - ethnicity - - ethnicity,gender - - ethnicity,gender,marital_status - - ethnicity,marital_status - - gender - - gender,marital_status - - marital_status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesEmploymentStatus,Ethnicity,Gender,MaritalStatus: - value: employment_status,ethnicity,gender,marital_status - summary: Original Enum Values Employment_status, Ethnicity, Gender, Marital_status - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - employment_status - - employment_status,ethnicity - - employment_status,ethnicity,gender - - employment_status,ethnicity,gender,marital_status - - employment_status,ethnicity,marital_status - - employment_status,gender - - employment_status,gender,marital_status - - employment_status,marital_status - - ethnicity - - ethnicity,gender - - ethnicity,gender,marital_status - - ethnicity,marital_status - - gender - - gender,marital_status - - marital_status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesEmploymentStatus,Ethnicity,Gender,MaritalStatus: - value: employment_status,ethnicity,gender,marital_status - summary: Original Enum Values Employment_status, Ethnicity, Gender, Marital_status - - in: query - name: started_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return employees that started after this - datetime. - - in: query - name: started_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return employees that started before this - datetime. - - in: query - name: team_id - schema: - type: string - description: If provided, will only return employees for this team. - examples: - TeamId: - summary: team_id - - in: query - name: terminated_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return employees that were terminated - after this datetime. - - in: query - name: terminated_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return employees that were terminated - before this datetime. - - in: query - name: work_email - schema: - type: string - format: email - nullable: true - description: If provided, will only return Employees with this work email - - in: query - name: work_location_id - schema: - type: string - description: If provided, will only return employees for this location. - examples: - WorkLocationId: - summary: work_location_id - tags: - - employees - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedEmployeeList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: employees_create - description: Creates an `Employee` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - employees - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EmployeeEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/EmployeeEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/EmployeeEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/EmployeeResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /hris/v1/employees/{id}: - get: - operationId: employees_retrieve - description: Returns an `Employee` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - company - - employments - - groups - - home_location - - manager - - pay_group - - team - - work_location - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandEmployments,Groups,HomeLocation,WorkLocation,Manager,Team,Company,PayGroup: - value: employments,groups,home_location,work_location,manager,team,company,pay_group - summary: Expand Employments, Groups, Home_location, Work_location, Manager, - Team, Company, Pay_group - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_sensitive_fields - schema: - type: boolean - description: Whether to include sensitive fields (such as social security - numbers) in the response. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - employment_status - - employment_status,ethnicity - - employment_status,ethnicity,gender - - employment_status,ethnicity,gender,marital_status - - employment_status,ethnicity,marital_status - - employment_status,gender - - employment_status,gender,marital_status - - employment_status,marital_status - - ethnicity - - ethnicity,gender - - ethnicity,gender,marital_status - - ethnicity,marital_status - - gender - - gender,marital_status - - marital_status - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesEmploymentStatus,Ethnicity,Gender,MaritalStatus: - value: employment_status,ethnicity,gender,marital_status - summary: Original Enum Values Employment_status, Ethnicity, Gender, Marital_status - - in: query - name: show_enum_origins - schema: - type: string - enum: - - employment_status - - employment_status,ethnicity - - employment_status,ethnicity,gender - - employment_status,ethnicity,gender,marital_status - - employment_status,ethnicity,marital_status - - employment_status,gender - - employment_status,gender,marital_status - - employment_status,marital_status - - ethnicity - - ethnicity,gender - - ethnicity,gender,marital_status - - ethnicity,marital_status - - gender - - gender,marital_status - - marital_status - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesEmploymentStatus,Ethnicity,Gender,MaritalStatus: - value: employment_status,ethnicity,gender,marital_status - summary: Original Enum Values Employment_status, Ethnicity, Gender, Marital_status - tags: - - employees - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Employee' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/employees/ignore/{model_id}: - post: - operationId: employees_ignore_create - description: Ignores a specific row based on the `model_id` in the url. These - records will have their properties set to null, and will not be updated in - future syncs. The "reason" and "message" fields in the request body will be - stored for audit purposes. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: model_id - schema: - type: string - format: uuid - required: true - tags: - - employees - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/IgnoreCommonModelRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/IgnoreCommonModelRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/IgnoreCommonModelRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - description: No response body - x-extra-tags: - - ignore-model - /hris/v1/employees/meta/post: - get: - operationId: employees_meta_post_retrieve - description: Returns metadata for `Employee` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - employees - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/employer-benefits: - get: - operationId: employer_benefits_list - description: Returns a list of `EmployerBenefit` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - employer-benefits - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedEmployerBenefitList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /hris/v1/employer-benefits/{id}: - get: - operationId: employer_benefits_retrieve - description: Returns an `EmployerBenefit` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - employer-benefits - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/EmployerBenefit' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /hris/v1/employments: - get: - operationId: employments_list - description: Returns a list of `Employment` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: employee_id - schema: - type: string - description: If provided, will only return employments for this employee. - examples: - EmployeeId: - summary: employee_id - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - employee - - pay_group - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandEmployee,PayGroup: - value: employee,pay_group - summary: Expand Employee, Pay_group - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: order_by - schema: - type: string - enum: - - -effective_date - - effective_date - x-fern-enum: - -effective_date: - name: EffectiveDateDescending - effective_date: - name: EffectiveDateAscending - description: 'Overrides the default ordering for this endpoint. Possible values - include: effective_date, -effective_date.' - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - employment_type - - employment_type,flsa_status - - employment_type,flsa_status,pay_frequency - - employment_type,flsa_status,pay_frequency,pay_period - - employment_type,flsa_status,pay_period - - employment_type,pay_frequency - - employment_type,pay_frequency,pay_period - - employment_type,pay_period - - flsa_status - - flsa_status,pay_frequency - - flsa_status,pay_frequency,pay_period - - flsa_status,pay_period - - pay_frequency - - pay_frequency,pay_period - - pay_period - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesEmploymentType,FlsaStatus,PayFrequency,PayPeriod: - value: employment_type,flsa_status,pay_frequency,pay_period - summary: Original Enum Values Employment_type, Flsa_status, Pay_frequency, - Pay_period - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - employment_type - - employment_type,flsa_status - - employment_type,flsa_status,pay_frequency - - employment_type,flsa_status,pay_frequency,pay_period - - employment_type,flsa_status,pay_period - - employment_type,pay_frequency - - employment_type,pay_frequency,pay_period - - employment_type,pay_period - - flsa_status - - flsa_status,pay_frequency - - flsa_status,pay_frequency,pay_period - - flsa_status,pay_period - - pay_frequency - - pay_frequency,pay_period - - pay_period - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesEmploymentType,FlsaStatus,PayFrequency,PayPeriod: - value: employment_type,flsa_status,pay_frequency,pay_period - summary: Original Enum Values Employment_type, Flsa_status, Pay_frequency, - Pay_period - tags: - - employments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedEmploymentList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/employments/{id}: - get: - operationId: employments_retrieve - description: Returns an `Employment` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - employee - - pay_group - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandEmployee,PayGroup: - value: employee,pay_group - summary: Expand Employee, Pay_group - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - employment_type - - employment_type,flsa_status - - employment_type,flsa_status,pay_frequency - - employment_type,flsa_status,pay_frequency,pay_period - - employment_type,flsa_status,pay_period - - employment_type,pay_frequency - - employment_type,pay_frequency,pay_period - - employment_type,pay_period - - flsa_status - - flsa_status,pay_frequency - - flsa_status,pay_frequency,pay_period - - flsa_status,pay_period - - pay_frequency - - pay_frequency,pay_period - - pay_period - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesEmploymentType,FlsaStatus,PayFrequency,PayPeriod: - value: employment_type,flsa_status,pay_frequency,pay_period - summary: Original Enum Values Employment_type, Flsa_status, Pay_frequency, - Pay_period - - in: query - name: show_enum_origins - schema: - type: string - enum: - - employment_type - - employment_type,flsa_status - - employment_type,flsa_status,pay_frequency - - employment_type,flsa_status,pay_frequency,pay_period - - employment_type,flsa_status,pay_period - - employment_type,pay_frequency - - employment_type,pay_frequency,pay_period - - employment_type,pay_period - - flsa_status - - flsa_status,pay_frequency - - flsa_status,pay_frequency,pay_period - - flsa_status,pay_period - - pay_frequency - - pay_frequency,pay_period - - pay_period - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesEmploymentType,FlsaStatus,PayFrequency,PayPeriod: - value: employment_type,flsa_status,pay_frequency,pay_period - summary: Original Enum Values Employment_type, Flsa_status, Pay_frequency, - Pay_period - tags: - - employments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Employment' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/field-mappings: - get: - operationId: field_mappings_retrieve - description: Get all Field Mappings for this Linked Account. Field Mappings - are mappings between third-party Remote Fields and user defined Merge fields. - [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: exclude_remote_field_metadata - schema: - type: boolean - description: If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` - will be null). This will increase the speed of the request since these fields - require some calculations. - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingApiInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: field_mappings_create - description: Create new Field Mappings that will be available after the next - scheduled sync. This will cause the next sync for this Linked Account to sync - **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: exclude_remote_field_metadata - schema: - type: boolean - description: If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` - will be null). This will increase the speed of the request since these fields - require some calculations. - tags: - - field-mapping - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/field-mappings/{field_mapping_id}: - patch: - operationId: field_mappings_partial_update - description: Create or update existing Field Mappings for a Linked Account. - Changes will be reflected after the next scheduled sync. This will cause the - next sync for this Linked Account to sync **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: field_mapping_id - schema: - type: string - format: uuid - required: true - tags: - - field-mapping - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - delete: - operationId: field_mappings_destroy - description: Deletes Field Mappings for a Linked Account. All data related to - this Field Mapping will be deleted and these changes will be reflected after - the next scheduled sync. This will cause the next sync for this Linked Account - to sync **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: field_mapping_id - schema: - type: string - format: uuid - required: true - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '204': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/generate-key: - post: - operationId: generate_key_create - description: Create a remote key. - tags: - - generate-key - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKey' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/groups: - get: - operationId: groups_list - description: Returns a list of `Group` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_commonly_used_as_team - schema: - type: string - description: If provided, specifies whether to return only Group objects which - refer to a team in the third party platform. Note that this is an opinionated - view based on how a team may be represented in the third party platform. - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: names - schema: - type: string - description: If provided, will only return groups with these names. Multiple - values can be separated by commas. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesType: - value: type - summary: Original Enum Values Type - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesType: - value: type - summary: Original Enum Values Type - - in: query - name: types - schema: - type: string - description: If provided, will only return groups of these types. Multiple - values can be separated by commas. - tags: - - groups - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedGroupList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/groups/{id}: - get: - operationId: groups_retrieve - description: Returns a `Group` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesType: - value: type - summary: Original Enum Values Type - - in: query - name: show_enum_origins - schema: - type: string - enum: - - type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesType: - value: type - summary: Original Enum Values Type - tags: - - groups - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Group' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/issues: - get: - operationId: issues_list - description: Gets all issues for Organization. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: account_token - schema: - type: string - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_date - schema: - type: string - description: If included, will only include issues whose most recent action - occurred before this time - - in: query - name: end_user_organization_name - schema: - type: string - - in: query - name: first_incident_time_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose first incident time - was after this datetime. - - in: query - name: first_incident_time_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose first incident time - was before this datetime. - - in: query - name: include_muted - schema: - type: string - description: If true, will include muted issues - - in: query - name: integration_name - schema: - type: string - - in: query - name: last_incident_time_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose last incident time - was after this datetime. - - in: query - name: last_incident_time_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose last incident time - was before this datetime. - - in: query - name: linked_account_id - schema: - type: string - description: If provided, will only include issues pertaining to the linked - account passed in. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: start_date - schema: - type: string - description: If included, will only include issues whose most recent action - occurred after this time - - in: query - name: status - schema: - type: string - enum: - - ONGOING - - RESOLVED - description: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - tags: - - issues - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedIssueList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/issues/{id}: - get: - operationId: issues_retrieve - description: Get a specific issue. - parameters: - - in: path - name: id - schema: - type: string - format: uuid - required: true - tags: - - issues - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Issue' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/link-token: - post: - operationId: link_token_create - description: Creates a link token to be used when linking a new end user. - tags: - - link-token - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LinkToken' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/linked-account-scopes: - get: - operationId: linked_account_scopes_retrieve - description: Get all available permissions for Merge Common Models and fields - for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - scopes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: linked_account_scopes_create - description: Update permissions for any Common Model or field for a single Linked - Account. Any Scopes not set in this POST request will inherit the default - Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - scopes - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/linked-accounts: - get: - operationId: linked_accounts_list - description: List linked accounts for your organization. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: category - schema: - type: string - nullable: true - enum: - - accounting - - ats - - crm - - filestorage - - hris - - mktg - - ticketing - description: |- - Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` - - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_user_email_address - schema: - type: string - description: If provided, will only return linked accounts associated with - the given email address. - - in: query - name: end_user_organization_name - schema: - type: string - description: If provided, will only return linked accounts associated with - the given organization name. - - in: query - name: end_user_origin_id - schema: - type: string - description: If provided, will only return linked accounts associated with - the given origin ID. - - in: query - name: end_user_origin_ids - schema: - type: string - description: Comma-separated list of EndUser origin IDs, making it possible - to specify multiple EndUsers at once. - - in: query - name: id - schema: - type: string - format: uuid - - in: query - name: ids - schema: - type: string - description: Comma-separated list of LinkedAccount IDs, making it possible - to specify multiple LinkedAccounts at once. - - in: query - name: include_duplicates - schema: - type: boolean - description: If `true`, will include complete production duplicates of the - account specified by the `id` query parameter in the response. `id` must - be for a complete production linked account. - - in: query - name: integration_name - schema: - type: string - description: If provided, will only return linked accounts associated with - the given integration name. - - in: query - name: is_test_account - schema: - type: string - description: If included, will only include test linked accounts. If not included, - will only include non-test linked accounts. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: status - schema: - type: string - description: 'Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, - `RELINK_NEEDED`' - tags: - - linked-accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAccountDetailsAndActionsList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/locations: - get: - operationId: locations_list - description: Returns a list of `Location` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: location_type - schema: - type: string - nullable: true - enum: - - HOME - - WORK - description: |- - If provided, will only return locations with this location_type - - * `HOME` - HOME - * `WORK` - WORK - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - country - - country,location_type - - location_type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesCountry,LocationType: - value: country,location_type - summary: Original Enum Values Country, Location_type - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - country - - country,location_type - - location_type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesCountry,LocationType: - value: country,location_type - summary: Original Enum Values Country, Location_type - tags: - - locations - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedLocationList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/locations/{id}: - get: - operationId: locations_retrieve - description: Returns a `Location` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - country - - country,location_type - - location_type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesCountry,LocationType: - value: country,location_type - summary: Original Enum Values Country, Location_type - - in: query - name: show_enum_origins - schema: - type: string - enum: - - country - - country,location_type - - location_type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesCountry,LocationType: - value: country,location_type - summary: Original Enum Values Country, Location_type - tags: - - locations - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Location' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/passthrough: - post: - operationId: passthrough_create - description: Pull data from an endpoint not currently supported by Merge. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - passthrough - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/pay-groups: - get: - operationId: pay_groups_list - description: Returns a list of `PayGroup` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - pay-groups - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedPayGroupList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/pay-groups/{id}: - get: - operationId: pay_groups_retrieve - description: Returns a `PayGroup` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - pay-groups - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PayGroup' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/payroll-runs: - get: - operationId: payroll_runs_list - description: Returns a list of `PayrollRun` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: ended_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return payroll runs ended after this datetime. - - in: query - name: ended_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return payroll runs ended before this - datetime. - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - run_state - - run_state,run_type - - run_type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesRunState,RunType: - value: run_state,run_type - summary: Original Enum Values Run_state, Run_type - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: run_type - schema: - type: string - nullable: true - enum: - - CORRECTION - - OFF_CYCLE - - REGULAR - - SIGN_ON_BONUS - - TERMINATION - description: |- - If provided, will only return PayrollRun's with this status. Options: ('REGULAR', 'OFF_CYCLE', 'CORRECTION', 'TERMINATION', 'SIGN_ON_BONUS') - - * `REGULAR` - REGULAR - * `OFF_CYCLE` - OFF_CYCLE - * `CORRECTION` - CORRECTION - * `TERMINATION` - TERMINATION - * `SIGN_ON_BONUS` - SIGN_ON_BONUS - - in: query - name: show_enum_origins - schema: - type: string - enum: - - run_state - - run_state,run_type - - run_type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesRunState,RunType: - value: run_state,run_type - summary: Original Enum Values Run_state, Run_type - - in: query - name: started_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return payroll runs started after this - datetime. - - in: query - name: started_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return payroll runs started before this - datetime. - tags: - - payroll-runs - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedPayrollRunList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /hris/v1/payroll-runs/{id}: - get: - operationId: payroll_runs_retrieve - description: Returns a `PayrollRun` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - run_state - - run_state,run_type - - run_type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesRunState,RunType: - value: run_state,run_type - summary: Original Enum Values Run_state, Run_type - - in: query - name: show_enum_origins - schema: - type: string - enum: - - run_state - - run_state,run_type - - run_type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesRunState,RunType: - value: run_state,run_type - summary: Original Enum Values Run_state, Run_type - tags: - - payroll-runs - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PayrollRun' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /hris/v1/regenerate-key: - post: - operationId: regenerate_key_create - description: Exchange remote keys. - tags: - - regenerate-key - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKey' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/remote-fields: - get: - operationId: remote_fields_retrieve - description: Get all remote fields for a Linked Account. Remote fields are third-party - fields that are accessible after initial sync if remote_data is enabled. You - can use remote fields to override existing Merge fields or map a new Merge - field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: common_models - schema: - type: string - description: A comma seperated list of Common Model names. If included, will - only return Remote Fields for those Common Models. - - in: query - name: include_example_values - schema: - type: string - description: If true, will include example values, where available, for remote - fields in the 3rd party platform. These examples come from active data from - your customers. - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteFieldAPIResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/sync-status: - get: - operationId: sync_status_list - description: Get sync status for the current sync and the most recently finished - sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` - represents the most recent time any sync completed. These timestamps may correspond - to different sync instances which may result in a sync start time being later - than a separate sync completed time. To ensure you are retrieving the latest - available data reference the `last_sync_finished` timestamp where `last_sync_result` - is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, - `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about - sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - sync-status - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedSyncStatusList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/sync-status/resync: - post: - operationId: sync_status_resync_create - description: Force re-sync of all models. This endpoint is available for monthly, - quarterly, and highest sync frequency customers on the Professional or Enterprise - plans. Doing so will consume a sync credit for the relevant linked account. - Force re-syncs can also be triggered manually in the Merge Dashboard and is - available for all customers. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - force-resync - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SyncStatus' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/target-fields: - get: - operationId: target_fields_retrieve - description: Get all organization-wide Target Fields, this will not include - any Linked Account specific Target Fields. Organization-wide Target Fields - are additional fields appended to the Merge Common Model for all Linked Accounts - in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ExternalTargetFieldAPIResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/teams: - get: - operationId: teams_list - description: Returns a list of `Team` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - parent_team - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandParentTeam: - value: parent_team - summary: Expand Parent_team - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: parent_team_id - schema: - type: string - description: If provided, will only return teams with this parent team. - examples: - ParentTeamId: - summary: parent_team_id - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - teams - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedTeamList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/teams/{id}: - get: - operationId: teams_retrieve - description: Returns a `Team` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - parent_team - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandParentTeam: - value: parent_team - summary: Expand Parent_team - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - teams - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Team' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/time-off: - get: - operationId: time_off_list - description: Returns a list of `TimeOff` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: approver_id - schema: - type: string - description: If provided, will only return time off for this approver. - examples: - ApproverId: - summary: approver_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: employee_id - schema: - type: string - description: If provided, will only return time off for this employee. - examples: - EmployeeId: - summary: employee_id - - in: query - name: ended_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return employees that ended after this - datetime. - - in: query - name: ended_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return time-offs that ended before this - datetime. - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - approver - - employee - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandEmployee,Approver: - value: employee,approver - summary: Expand Employee, Approver - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_fields - schema: - type: string - enum: - - request_type - - request_type,status - - request_type,status,units - - request_type,units - - status - - status,units - - units - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesRequestType,Status,Units: - value: request_type,status,units - summary: Original Enum Values Request_type, Status, Units - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: request_type - schema: - type: string - nullable: true - enum: - - BEREAVEMENT - - JURY_DUTY - - PERSONAL - - SICK - - VACATION - - VOLUNTEER - description: |- - If provided, will only return TimeOff with this request type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') - - * `VACATION` - VACATION - * `SICK` - SICK - * `PERSONAL` - PERSONAL - * `JURY_DUTY` - JURY_DUTY - * `VOLUNTEER` - VOLUNTEER - * `BEREAVEMENT` - BEREAVEMENT - - in: query - name: show_enum_origins - schema: - type: string - enum: - - request_type - - request_type,status - - request_type,status,units - - request_type,units - - status - - status,units - - units - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesRequestType,Status,Units: - value: request_type,status,units - summary: Original Enum Values Request_type, Status, Units - - in: query - name: started_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return time-offs that started after this - datetime. - - in: query - name: started_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return time-offs that started before this - datetime. - - in: query - name: status - schema: - type: string - nullable: true - enum: - - APPROVED - - CANCELLED - - DECLINED - - DELETED - - REQUESTED - description: |- - If provided, will only return TimeOff with this status. Options: ('REQUESTED', 'APPROVED', 'DECLINED', 'CANCELLED', 'DELETED') - - * `REQUESTED` - REQUESTED - * `APPROVED` - APPROVED - * `DECLINED` - DECLINED - * `CANCELLED` - CANCELLED - * `DELETED` - DELETED - tags: - - time-off - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedTimeOffList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: time_off_create - description: Creates a `TimeOff` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - time-off - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TimeOffEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/TimeOffEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/TimeOffEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/TimeOffResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /hris/v1/time-off-balances: - get: - operationId: time_off_balances_list - description: Returns a list of `TimeOffBalance` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: employee_id - schema: - type: string - description: If provided, will only return time off balances for this employee. - examples: - EmployeeId: - summary: employee_id - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - employee - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandEmployee: - value: employee - summary: Expand Employee - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: policy_type - schema: - type: string - nullable: true - enum: - - BEREAVEMENT - - JURY_DUTY - - PERSONAL - - SICK - - VACATION - - VOLUNTEER - description: |- - If provided, will only return TimeOffBalance with this policy type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') - - * `VACATION` - VACATION - * `SICK` - SICK - * `PERSONAL` - PERSONAL - * `JURY_DUTY` - JURY_DUTY - * `VOLUNTEER` - VOLUNTEER - * `BEREAVEMENT` - BEREAVEMENT - - in: query - name: remote_fields - schema: - type: string - enum: - - policy_type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesPolicyType: - value: policy_type - summary: Original Enum Values Policy_type - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - policy_type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesPolicyType: - value: policy_type - summary: Original Enum Values Policy_type - tags: - - time-off-balances - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedTimeOffBalanceList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/time-off-balances/{id}: - get: - operationId: time_off_balances_retrieve - description: Returns a `TimeOffBalance` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - employee - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandEmployee: - value: employee - summary: Expand Employee - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - policy_type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesPolicyType: - value: policy_type - summary: Original Enum Values Policy_type - - in: query - name: show_enum_origins - schema: - type: string - enum: - - policy_type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesPolicyType: - value: policy_type - summary: Original Enum Values Policy_type - tags: - - time-off-balances - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/TimeOffBalance' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/time-off/{id}: - get: - operationId: time_off_retrieve - description: Returns a `TimeOff` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - approver - - employee - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandEmployee,Approver: - value: employee,approver - summary: Expand Employee, Approver - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - request_type - - request_type,status - - request_type,status,units - - request_type,units - - status - - status,units - - units - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesRequestType,Status,Units: - value: request_type,status,units - summary: Original Enum Values Request_type, Status, Units - - in: query - name: show_enum_origins - schema: - type: string - enum: - - request_type - - request_type,status - - request_type,status,units - - request_type,units - - status - - status,units - - units - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesRequestType,Status,Units: - value: request_type,status,units - summary: Original Enum Values Request_type, Status, Units - tags: - - time-off - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/TimeOff' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/time-off/meta/post: - get: - operationId: time_off_meta_post_retrieve - description: Returns metadata for `TimeOff` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - time-off - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/timesheet-entries: - get: - operationId: timesheet_entries_list - description: Returns a list of `TimesheetEntry` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: employee_id - schema: - type: string - description: If provided, will only return timesheet entries for this employee. - examples: - EmployeeId: - summary: employee_id - - in: query - name: ended_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return timesheet entries ended after this - datetime. - - in: query - name: ended_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return timesheet entries ended before - this datetime. - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - employee - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandEmployee: - value: employee - summary: Expand Employee - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: order_by - schema: - type: string - enum: - - -start_time - - start_time - x-fern-enum: - -start_time: - name: StartTimeDescending - start_time: - name: StartTimeAscending - description: 'Overrides the default ordering for this endpoint. Possible values - include: start_time, -start_time.' - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: started_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return timesheet entries started after - this datetime. - - in: query - name: started_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return timesheet entries started before - this datetime. - tags: - - timesheet-entries - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedTimesheetEntryList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: timesheet_entries_create - description: Creates a `TimesheetEntry` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - timesheet-entries - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TimesheetEntryEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/TimesheetEntryEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/TimesheetEntryEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/TimesheetEntryResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/timesheet-entries/{id}: - get: - operationId: timesheet_entries_retrieve - description: Returns a `TimesheetEntry` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - employee - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandEmployee: - value: employee - summary: Expand Employee - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - timesheet-entries - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/TimesheetEntry' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/timesheet-entries/meta/post: - get: - operationId: timesheet_entries_meta_post_retrieve - description: Returns metadata for `TimesheetEntry` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - timesheet-entries - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /hris/v1/webhook-receivers: - get: - operationId: webhook_receivers_list - description: Returns a list of `WebhookReceiver` objects. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - webhook-receivers - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/WebhookReceiver' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: webhook_receivers_create - description: Creates a `WebhookReceiver` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - webhook-receivers - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookReceiver' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC -components: - schemas: - AccountDetails: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - integration: - type: string - readOnly: true - example: BambooHR - integration_slug: - type: string - readOnly: true - example: bamboohr - category: - oneOf: - - $ref: '#/components/schemas/CategoryEnum' - - type: string - nullable: true - example: hris - end_user_origin_id: - type: string - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - end_user_organization_name: - type: string - readOnly: true - example: Waystar Royco - end_user_email_address: - type: string - format: email - readOnly: true - example: kendall.roy@waystar-royco.com - status: - type: string - readOnly: true - example: COMPLETE - webhook_listener_url: - type: string - format: uri - readOnly: true - example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: - type: boolean - nullable: true - readOnly: true - description: Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test Linked - Accounts, incomplete Production Linked Accounts, and ignored duplicate - Production Linked Account sets. - example: true - account_type: - type: string - readOnly: true - example: PRODUCTION - completed_at: - type: string - format: date-time - nullable: true - description: The time at which account completes the linking flow. - example: '2024-08-26T20:11:19.277118Z' - x-merge-category: hris - AccountDetailsAndActions: - type: object - description: |- - # The LinkedAccount Object - ### Description - The `LinkedAccount` object is used to represent an end user's link with a specific integration. - - ### Usage Example - View a list of your organization's `LinkedAccount` objects. - properties: - id: - type: string - example: e59b1821-f85c-4e28-a6b3-1804156f3563 - category: - oneOf: - - $ref: '#/components/schemas/CategoryEnum' - - type: string - example: hris - status: - oneOf: - - $ref: '#/components/schemas/AccountDetailsAndActionsStatusEnum' - - type: string - example: INCOMPLETE - status_detail: - type: string - example: Invalid login credentials - end_user_origin_id: - type: string - example: 3ac95cde-6c7f-4eef-afec-be710b42308d - end_user_organization_name: - type: string - example: Foo Bar, LLC - end_user_email_address: - type: string - example: hradmin@foobar.dev - subdomain: - type: string - description: The tenant or domain the customer has provided access to. - example: foobar - webhook_listener_url: - type: string - example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: - type: boolean - nullable: true - description: Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test Linked - Accounts, incomplete Production Linked Accounts, and ignored duplicate - Production Linked Account sets. - example: true - integration: - $ref: '#/components/schemas/AccountDetailsAndActionsIntegration' - example: - name: SAP SuccessFactors - categories: - - hris - - ats - image: https://cdn.merge.dev/SuccessFactors_Logo.png - square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg - color: '#F6A704' - slug: sap-successfactors - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - account_type: - type: string - example: PRODUCTION - completed_at: - type: string - format: date-time - example: '2024-08-26T20:11:19.277118Z' - required: - - account_type - - completed_at - - end_user_email_address - - end_user_organization_name - - id - - status - - webhook_listener_url - x-merge-sample-json: '{"id": "e59b1821-f85c-4e28-a6b3-1804156f3563", "category": - "hris", "status": "INCOMPLETE", "status_detail": "Invalid login credentials", - "end_user_origin_id": "3ac95cde-6c7f-4eef-afec-be710b42308d", "end_user_organization_name": - "Foo Bar, LLC", "end_user_email_address": "hradmin@foobar.dev", "webhook_listener_url": - "https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4", - "is_duplicate": true, "integration": {"name": "SAP SuccessFactors", "categories": - ["hris", "ats"], "image": "https://cdn.merge.dev/SuccessFactors_Logo.png", - "square_image": "https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg", "color": - "#F6A704", "slug": "sap-successfactors", "passthrough_available": true, "available_model_operations": - [{"model_name": "Candidate", "available_operations": ["FETCH", "CREATE"], - "required_post_parameters": ["remote_user_id"], "supported_fields": ["first_name", - "last_name", "company", "title"]}]}}' - x-merge-category: hris - AccountDetailsAndActionsIntegration: - type: object - properties: - name: - type: string - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - image: - type: string - square_image: - type: string - color: - type: string - slug: - type: string - passthrough_available: - type: boolean - available_model_operations: - type: array - items: - $ref: '#/components/schemas/ModelOperation' - required: - - categories - - color - - name - - passthrough_available - - slug - x-merge-category: hris - AccountDetailsAndActionsStatusEnum: - enum: - - COMPLETE - - INCOMPLETE - - RELINK_NEEDED - - IDLE - type: string - description: |- - * `COMPLETE` - COMPLETE - * `INCOMPLETE` - INCOMPLETE - * `RELINK_NEEDED` - RELINK_NEEDED - * `IDLE` - IDLE - x-merge-category: hris - AccountIntegration: - type: object - properties: - name: - type: string - description: Company name. - abbreviated_name: - type: string - nullable: true - description: "Optional. This shortened name appears in places with limited - space, usually in conjunction with the platform's logo (e.g., Merge Link - menu).

Example: Workforce Now (in lieu of ADP Workforce Now), - SuccessFactors (in lieu of SAP SuccessFactors)" - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - description: Category or categories this integration belongs to. Multiple - categories should be comma separated, i.e. [ats, hris]. - readOnly: true - image: - type: string - format: uri - nullable: true - description: Company logo in rectangular shape. - square_image: - type: string - format: uri - nullable: true - description: Company logo in square shape. - color: - type: string - description: The color of this integration used for buttons and text throughout - the app and landing pages. Choose a darker, saturated color. - pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ - maxLength: 18 - slug: - type: string - readOnly: true - api_endpoints_to_documentation_urls: - type: object - additionalProperties: {} - description: "Mapping of API endpoints to documentation urls for support. - Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', - 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], - 'POST': []}" - webhook_setup_guide_url: - type: string - nullable: true - description: Setup guide URL for third party webhook creation. Exposed in - Merge Docs. - category_beta_status: - type: object - description: Category or categories this integration is in beta status for. - readOnly: true - required: - - name - x-merge-category: hris - AccountToken: - type: object - properties: - account_token: - type: string - example: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB - integration: - $ref: '#/components/schemas/AccountIntegration' - example: - name: SAP SuccessFactors - categories: - - hris - - ats - image: https://cdn.merge.dev/SuccessFactors_Logo.png - square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg - color: '#F6A704' - slug: sap-successfactors - id: - type: string - example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - required: - - account_token - - id - - integration - x-merge-category: hris - AccountTypeEnum: - enum: - - SAVINGS - - CHECKING - type: string - description: |- - * `SAVINGS` - SAVINGS - * `CHECKING` - CHECKING - x-merge-category: hris - AdvancedMetadata: - type: object - properties: - id: - type: string - format: uuid - display_name: - type: string - description: - type: string - is_required: - type: boolean - is_custom: - type: boolean - field_choices: - type: array - items: {} - required: - - id - x-merge-category: hris - AsyncPassthroughReciept: - type: object - properties: - async_passthrough_receipt_id: - type: string - format: uuid - example: fd29020f-2695-445e-922e-dcd5e81903fd - required: - - async_passthrough_receipt_id - x-merge-category: hris - AuditLogEvent: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: b5ceea2a-7171-47ce-8090-165cfce5572c - user_name: - type: string - nullable: true - description: The User's full name at the time of this Event occurring. - maxLength: 200 - example: Gil Feig - user_email: - type: string - format: email - nullable: true - description: The User's email at the time of this Event occurring. - maxLength: 254 - example: hello@merge.dev - role: - oneOf: - - $ref: '#/components/schemas/RoleEnum' - - type: string - description: |- - Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. - - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - example: ADMIN - ip_address: - type: string - maxLength: 45 - example: 192.0.2.123 - event_type: - oneOf: - - $ref: '#/components/schemas/EventTypeEnum' - - type: string - description: |- - Designates the type of event that occurred. - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - * `INVITED_USER` - INVITED_USER - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - * `CREATED_DESTINATION` - CREATED_DESTINATION - * `DELETED_DESTINATION` - DELETED_DESTINATION - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - * `CHANGED_SCOPES` - CHANGED_SCOPES - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - * `RESET_PASSWORD` - RESET_PASSWORD - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - * `MUTED_ISSUE` - MUTED_ISSUE - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - example: CHANGED_SCOPES - event_description: - type: string - example: Organization-wide Scopes for model hris.Employee updated from Read - to Read+Write - created_at: - type: string - format: date-time - readOnly: true - required: - - event_description - - event_type - - ip_address - - role - x-merge-category: hris - AvailableActions: - type: object - description: |- - # The AvailableActions Object - ### Description - The `Activity` object is used to see all available model/operation combinations for an integration. - - ### Usage Example - Fetch all the actions available for the `Zenefits` integration. - properties: - integration: - $ref: '#/components/schemas/AccountIntegration' - example: - name: Lever - categories: - - ats - image: https://merge-api-production.s3.amazonaws.com/media/Lever_Logo.png - square_image: https://merge-api-production.s3.amazonaws.com/media/Lever_Square_Logo.png - color: '#262A34' - is_in_beta: 'true' - api_endpoints_to_documentation_urls: "{'GET': [('/common-model-scopes', - 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve')], - 'POST': []}" - passthrough_available: - type: boolean - example: true - available_model_operations: - type: array - items: - $ref: '#/components/schemas/ModelOperation' - example: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - required: - - integration - - passthrough_available - x-merge-category: hris - BankInfo: - type: object - description: |- - # The BankInfo Object - ### Description - The `BankInfo` object is used to represent the Bank Account information for an Employee. - - ### Usage Example - Fetch from the `LIST BankInfo` endpoint and filter by `ID` to show all bank information. - properties: - id: - type: string - format: uuid - readOnly: true - example: fd1e0fb5-8f92-4ec9-9f32-179cf732867d - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '123234' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee with this bank account. - example: a3617eb4-dfe3-426f-921e-a65fc1661e10 - x-merge-expands-to: Employee - account_number: - type: string - nullable: true - description: The account number. - maxLength: 100 - example: '439291590' - routing_number: - type: string - nullable: true - description: The routing number. - example: '089690059' - bank_name: - type: string - nullable: true - description: The bank name. - example: Chase - account_type: - oneOf: - - $ref: '#/components/schemas/AccountTypeEnum' - - type: string - nullable: true - description: |- - The bank account type - - * `SAVINGS` - SAVINGS - * `CHECKING` - CHECKING - example: CHECKING - remote_created_at: - type: string - format: date-time - nullable: true - description: When the matching bank object was created in the third party - system. - example: '2021-12-06T10:11:26Z' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /bank-info - data: - - Varies by platform - x-merge-expands: '{"employee": "Employee"}' - x-merge-category: hris - Benefit: - type: object - description: |- - # The Benefit Object - ### Description - The `Benefit` object is used to represent a benefit that an employee has enrolled in. - - ### Usage Example - Fetch from the `LIST Benefits` endpoint and filter by `ID` to show all benefits. - properties: - id: - type: string - format: uuid - readOnly: true - example: 3fe5ae7a-f1ba-4529-b7af-84e86dc6d232 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee on the plan. - example: d2f972d0-2526-434b-9409-4c3b468e08f0 - x-merge-expands-to: Employee - provider_name: - type: string - nullable: true - description: The name of the benefit provider. - example: Blue Shield of California - benefit_plan_type: - type: string - nullable: true - description: The type of benefit plan - deprecated: true - employee_contribution: - type: number - format: double - nullable: true - description: The employee's contribution. - example: 23.65 - company_contribution: - type: number - format: double - nullable: true - description: The company's contribution. - example: 150 - start_date: - type: string - format: date-time - nullable: true - description: The day and time the benefit started. - example: '2020-11-15 00:59:25.309761+00:00' - end_date: - type: string - format: date-time - nullable: true - description: The day and time the benefit ended. - example: '2021-10-15 00:23:25.309761+00:00' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - employer_benefit: - type: string - format: uuid - nullable: true - description: The employer benefit plan the employee is enrolled in. - example: 025fjlc6-6000-430a-848e-aafacbadf4fe - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /benefits - data: - - Varies by platform - x-merge-expands: '{"employee": "Employee"}' - x-merge-category: hris - BenefitPlanTypeEnum: - enum: - - MEDICAL - - HEALTH_SAVINGS - - INSURANCE - - RETIREMENT - - OTHER - type: string - description: |- - * `MEDICAL` - MEDICAL - * `HEALTH_SAVINGS` - HEALTH_SAVINGS - * `INSURANCE` - INSURANCE - * `RETIREMENT` - RETIREMENT - * `OTHER` - OTHER - x-merge-category: hris - CategoriesEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - type: string - description: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - x-merge-category: hris - CategoryEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - type: string - description: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - x-merge-category: hris - CommonModelScopeAPI: - type: object - properties: - common_models: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializer' - description: The common models you want to update the scopes for - example: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - required: - - common_models - x-merge-category: hris - CommonModelScopesBodyRequest: - type: object - properties: - model_id: - type: string - minLength: 1 - example: hris.Employee - enabled_actions: - type: array - items: - $ref: '#/components/schemas/EnabledActionsEnum' - example: - - READ - - WRITE - disabled_fields: - type: array - items: - type: string - minLength: 1 - example: - - first_name - required: - - disabled_fields - - enabled_actions - - model_id - x-merge-category: hris - Company: - type: object - description: |- - # The Company Object - ### Description - The `Company` object is used to represent a company within the HRIS / Payroll system. - - ### Usage Example - Fetch from the `LIST Companies` endpoint and filter by `ID` to show all companies. - properties: - id: - type: string - format: uuid - readOnly: true - example: 1b998423-db0a-4037-a4cf-f79c60cb67b3 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - legal_name: - type: string - nullable: true - description: The company's legal name. - example: Waystar Royco, Inc. - display_name: - type: string - nullable: true - description: The company's display name. - example: Waystar Royco - eins: - type: array - items: - type: string - nullable: true - nullable: true - description: The company's Employer Identification Numbers. - example: - - 12-3456789 - - 12-3451111 - - 11-0011000 - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /companies - data: - - Varies by platform - x-merge-category: hris - CountryEnum: - enum: - - AF - - AX - - AL - - DZ - - AS - - AD - - AO - - AI - - AQ - - AG - - AR - - AM - - AW - - AU - - AT - - AZ - - BS - - BH - - BD - - BB - - BY - - BE - - BZ - - BJ - - BM - - BT - - BO - - BQ - - BA - - BW - - BV - - BR - - IO - - BN - - BG - - BF - - BI - - CV - - KH - - CM - - CA - - KY - - CF - - TD - - CL - - CN - - CX - - CC - - CO - - KM - - CG - - CD - - CK - - CR - - CI - - HR - - CU - - CW - - CY - - CZ - - DK - - DJ - - DM - - DO - - EC - - EG - - SV - - GQ - - ER - - EE - - SZ - - ET - - FK - - FO - - FJ - - FI - - FR - - GF - - PF - - TF - - GA - - GM - - GE - - DE - - GH - - GI - - GR - - GL - - GD - - GP - - GU - - GT - - GG - - GN - - GW - - GY - - HT - - HM - - VA - - HN - - HK - - HU - - IS - - IN - - ID - - IR - - IQ - - IE - - IM - - IL - - IT - - JM - - JP - - JE - - JO - - KZ - - KE - - KI - - KW - - KG - - LA - - LV - - LB - - LS - - LR - - LY - - LI - - LT - - LU - - MO - - MG - - MW - - MY - - MV - - ML - - MT - - MH - - MQ - - MR - - MU - - YT - - MX - - FM - - MD - - MC - - MN - - ME - - MS - - MA - - MZ - - MM - - NA - - NR - - NP - - NL - - NC - - NZ - - NI - - NE - - NG - - NU - - NF - - KP - - MK - - MP - - NO - - OM - - PK - - PW - - PS - - PA - - PG - - PY - - PE - - PH - - PN - - PL - - PT - - PR - - QA - - RE - - RO - - RU - - RW - - BL - - SH - - KN - - LC - - MF - - PM - - VC - - WS - - SM - - ST - - SA - - SN - - RS - - SC - - SL - - SG - - SX - - SK - - SI - - SB - - SO - - ZA - - GS - - KR - - SS - - ES - - LK - - SD - - SR - - SJ - - SE - - CH - - SY - - TW - - TJ - - TZ - - TH - - TL - - TG - - TK - - TO - - TT - - TN - - TR - - TM - - TC - - TV - - UG - - UA - - AE - - GB - - UM - - US - - UY - - UZ - - VU - - VE - - VN - - VG - - VI - - WF - - EH - - YE - - ZM - - ZW - type: string - description: |- - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - x-merge-category: hris - CreateFieldMappingRequest: - type: object - properties: - target_field_name: - type: string - minLength: 1 - description: The name of the target field you want this remote field to - map to. - example: example_target_field_name - target_field_description: - type: string - minLength: 1 - description: The description of the target field you want this remote field - to map to. - example: this is a example description of the target field - remote_field_traversal_path: - type: array - items: {} - description: The field traversal path of the remote field listed when you - hit the GET /remote-fields endpoint. - example: - - example_remote_field - remote_method: - type: string - minLength: 1 - description: The method of the remote endpoint where the remote field is - coming from. - example: GET - remote_url_path: - type: string - minLength: 1 - description: The path of the remote endpoint where the remote field is coming - from. - example: /example-url-path - common_model_name: - type: string - minLength: 1 - description: The name of the Common Model that the remote field corresponds - to in a given category. - example: ExampleCommonModel - required: - - common_model_name - - remote_field_traversal_path - - remote_method - - remote_url_path - - target_field_description - - target_field_name - x-merge-category: hris - DataPassthroughRequest: - type: object - description: |- - # The DataPassthrough Object - ### Description - The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. - - ### Usage Example - Create a `DataPassthrough` to get team hierarchies from your Rippling integration. - properties: - method: - allOf: - - $ref: '#/components/schemas/MethodEnum' - example: POST - path: - type: string - minLength: 1 - description: The path of the request in the third party's platform. - example: /scooters - base_url_override: - type: string - nullable: true - minLength: 1 - description: An optional override of the third party's base url for the - request. - example: https://api.example.com - data: - type: string - nullable: true - minLength: 1 - description: The data with the request. You must include a `request_format` - parameter matching the data's format - example: '{"company": "Lime", "model": "Gen 2.5"}' - multipart_form_data: - type: array - items: - $ref: '#/components/schemas/MultipartFormFieldRequest' - nullable: true - description: Pass an array of `MultipartFormField` objects in here instead - of using the `data` param if `request_format` is set to `MULTIPART`. - headers: - type: object - additionalProperties: {} - nullable: true - description: The headers to use for the request (Merge will handle the account's - authorization headers). `Content-Type` header is required for passthrough. - Choose content type corresponding to expected format of receiving server. - example: - EXTRA-HEADER: value - request_format: - allOf: - - $ref: '#/components/schemas/RequestFormatEnum' - nullable: true - example: JSON - normalize_response: - type: boolean - description: 'Optional. If true, the response will always be an object of - the form `{"type": T, "value": ...}` where `T` will be one of `string, - boolean, number, null, array, object`.' - required: - - method - - path - x-merge-category: hris - DebugModeLog: - type: object - properties: - log_id: - type: string - example: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: - type: string - example: https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - $ref: '#/components/schemas/DebugModelLogSummary' - example: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - required: - - dashboard_view - - log_id - - log_summary - x-merge-sample-json: '{"log_id": "99433219-8017-4acd-bb3c-ceb23d663832", "dashboard_view": - "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832", "log_summary": - {"url": "www.exampleintegration.com/api/v1/exampleapi", "method": "POST", - "status_code": 200}}' - x-merge-category: hris - DebugModelLogSummary: - type: object - properties: - url: - type: string - example: www.exampleintegration.com/api/v1/exampleapi - method: - type: string - example: POST - status_code: - type: integer - example: 200 - required: - - method - - status_code - - url - x-merge-sample-json: '{"url": "www.exampleintegration.com/api/v1/exampleapi", - "method": "POST", "status_code": 200}' - x-merge-category: hris - Deduction: - type: object - description: |- - # The Deduction Object - ### Description - The `Deduction` object is used to represent an array of the wages withheld from total earnings for the purpose of paying taxes. - - ### Usage Example - Fetch from the `LIST Deductions` endpoint and filter by `ID` to show all deductions. - properties: - id: - type: string - format: uuid - readOnly: true - example: 5fd439fc-1b64-4755-b275-64918936c365 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '93478612' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - employee_payroll_run: - type: string - format: uuid - nullable: true - example: 35347df1-95e7-46e2-93cc-66f1191edca5 - name: - type: string - nullable: true - description: The deduction's name. - example: Social Security - employee_deduction: - type: number - format: double - nullable: true - description: The amount of money that is withheld from an employee's gross - pay by the employee. - example: 34.54 - company_deduction: - type: number - format: double - nullable: true - description: The amount of money that is withheld on behalf of an employee - by the company. - example: 78.78 - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /payroll-deduction - data: - - Varies by platform - x-merge-nested-write-allowed: true - x-merge-category: hris - Dependent: - type: object - description: |- - # The Dependent Object - ### Description - The `Dependent` object is used to represent a dependent (e.g. child, spouse, domestic partner, etc) of an `Employee` - - ### Usage Example - Fetch from the `LIST Dependents` endpoint and filter by `ID` to show all dependents. - properties: - id: - type: string - format: uuid - readOnly: true - example: 025fjlc6-6000-430a-848e-aafacbadf4fe - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202940' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - first_name: - type: string - nullable: true - description: The dependents's first name. - maxLength: 60 - example: Greg - middle_name: - type: string - nullable: true - description: The dependents's middle name. - maxLength: 60 - example: A - last_name: - type: string - nullable: true - description: The dependents's last name. - maxLength: 60 - example: Hirsch - relationship: - oneOf: - - $ref: '#/components/schemas/RelationshipEnum' - - type: string - nullable: true - description: |- - The dependent's relationship to the employee. - - * `CHILD` - CHILD - * `SPOUSE` - SPOUSE - * `DOMESTIC_PARTNER` - DOMESTIC_PARTNER - example: CHILD - employee: - type: string - format: uuid - nullable: true - description: The employee this person is a dependent of. - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - date_of_birth: - type: string - format: date-time - nullable: true - description: The dependent's date of birth. - example: '1990-11-10T00:00:00Z' - gender: - oneOf: - - $ref: '#/components/schemas/GenderEnum' - - type: string - nullable: true - description: |- - The dependent's gender. - - * `MALE` - MALE - * `FEMALE` - FEMALE - * `NON-BINARY` - NON-BINARY - * `OTHER` - OTHER - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - example: MALE - phone_number: - type: string - nullable: true - description: The dependent's phone number. - maxLength: 50 - example: '+1234567890' - home_location: - type: string - format: uuid - nullable: true - description: The dependents's home address. - example: d2f972d0-2526-434b-9409-4c3b468e08f0 - is_student: - type: boolean - nullable: true - description: Whether or not the dependent is a student - ssn: - type: string - nullable: true - description: The dependents's social security number. - maxLength: 50 - example: '1234567890' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /dependent - data: - - Varies by platform - x-merge-category: hris - Earning: - type: object - description: |- - # The Earning Object - ### Description - The `Earning` object is used to represent an array of different compensations that an employee receives within specific wage categories. - - ### Usage Example - Fetch from the `LIST Earnings` endpoint and filter by `ID` to show all earnings. - properties: - id: - type: string - format: uuid - readOnly: true - example: babbced6-3a81-4775-8da2-490dc6385259 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '52802' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - employee_payroll_run: - type: string - format: uuid - nullable: true - example: 35347df1-95e7-46e2-93cc-66f1191edca5 - amount: - type: number - format: double - nullable: true - description: The amount earned. - example: 1002.34 - type: - oneOf: - - $ref: '#/components/schemas/EarningTypeEnum' - - type: string - nullable: true - description: |- - The type of earning. - - * `SALARY` - SALARY - * `REIMBURSEMENT` - REIMBURSEMENT - * `OVERTIME` - OVERTIME - * `BONUS` - BONUS - example: SALARY - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - x-merge-nested-write-allowed: true - x-merge-category: hris - EarningTypeEnum: - enum: - - SALARY - - REIMBURSEMENT - - OVERTIME - - BONUS - type: string - description: |- - * `SALARY` - SALARY - * `REIMBURSEMENT` - REIMBURSEMENT - * `OVERTIME` - OVERTIME - * `BONUS` - BONUS - x-merge-category: hris - Employee: - type: object - description: |- - # The Employee Object - ### Description - The `Employee` object is used to represent any person who has been employed by a company. By default, it returns all employees. To filter for only active employees, set the `employment_status` query parameter to `ACTIVE`. - - ### Usage Example - Fetch from the `LIST Employee` endpoint and filter by `ID` to show all employees. - properties: - id: - type: string - format: uuid - readOnly: true - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - employee_number: - type: string - nullable: true - description: The employee's number that appears in the third-party integration's - UI. - example: '2' - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Company' - nullable: true - description: The ID of the employee's company. - example: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - x-merge-expands-to: Company - first_name: - type: string - nullable: true - description: The employee's first name. - example: Greg - last_name: - type: string - nullable: true - description: The employee's last name. - example: Hirsch - preferred_name: - type: string - nullable: true - description: The employee's preferred first name. - example: Greg the egg - display_full_name: - type: string - nullable: true - description: The employee's full name, to use for display purposes. If a - preferred first name is available, the full name will include the preferred - first name. - example: Cousin Greg Hirsch - username: - type: string - nullable: true - description: The employee's username that appears in the remote UI. - example: cousingreg - groups: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Group' - nullable: true - example: - - 21a54124-397f-494d-985e-3c5b330b8a68 - x-merge-expands-to: Group - work_email: - type: string - format: email - nullable: true - description: The employee's work email. - maxLength: 254 - example: greg@merge.dev - personal_email: - type: string - format: email - nullable: true - description: The employee's personal email. - maxLength: 254 - example: greg@gmail.com - mobile_phone_number: - type: string - nullable: true - description: The employee's mobile phone number. - example: '+1234567890' - employments: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employment' - nullable: true - example: - - 17a54124-287f-494d-965e-3c5b330c9a68 - description: Array of `Employment` IDs for this Employee. - x-merge-expands-to: Employment - home_location: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Location' - nullable: true - description: The employee's home address. - example: d2f972d0-2526-434b-9409-4c3b468e08f0 - x-merge-expands-to: Location - work_location: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Location' - nullable: true - description: The employee's work address. - example: 9efbc633-3387-4306-aa55-e2c635e6bb4f - x-merge-expands-to: Location - manager: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee ID of the employee's manager. - example: 0048ea5b-911e-4dff-9364-92070dea62ff - x-merge-expands-to: Employee - team: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Team' - nullable: true - description: The employee's team. - deprecated: true - x-merge-expands-to: Team - pay_group: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PayGroup' - nullable: true - description: The employee's pay group - example: ad1264e2-39be-4787-b749-f1aade9e3405 - x-merge-expands-to: PayGroup - ssn: - type: string - nullable: true - description: The employee's social security number. - maxLength: 100 - example: '1234567890' - gender: - oneOf: - - $ref: '#/components/schemas/GenderEnum' - - type: string - nullable: true - description: |- - The employee's gender. - - * `MALE` - MALE - * `FEMALE` - FEMALE - * `NON-BINARY` - NON-BINARY - * `OTHER` - OTHER - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - example: MALE - ethnicity: - oneOf: - - $ref: '#/components/schemas/EthnicityEnum' - - type: string - nullable: true - description: |- - The employee's ethnicity. - - * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE - * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT - * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN - * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO - * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES - * `WHITE` - WHITE - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - example: WHITE - marital_status: - oneOf: - - $ref: '#/components/schemas/MaritalStatusEnum' - - type: string - nullable: true - description: |- - The employee's filing status as related to marital status. - - * `SINGLE` - SINGLE - * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY - * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY - * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD - * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD - example: SINGLE - date_of_birth: - type: string - format: date-time - nullable: true - description: The employee's date of birth. - example: '1990-11-10T00:00:00Z' - hire_date: - type: string - format: date-time - nullable: true - description: "The date that the employee was hired, usually the day that - an offer letter is signed. If an employee has multiple hire dates from - previous employments, this represents the most recent hire date. Note: - If you're looking for the employee's start date, refer to the start_date - field." - deprecated: true - example: '2020-10-10T00:00:00Z' - start_date: - type: string - format: date-time - nullable: true - description: The date that the employee started working. If an employee - was rehired, the most recent start date will be returned. - example: '2020-10-11T00:00:00Z' - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's employee was created. - example: '2020-10-11T00:00:00Z' - employment_status: - oneOf: - - $ref: '#/components/schemas/EmploymentStatusEnum' - - type: string - nullable: true - description: |- - The employment status of the employee. - - * `ACTIVE` - ACTIVE - * `PENDING` - PENDING - * `INACTIVE` - INACTIVE - example: INACTIVE - termination_date: - type: string - format: date-time - nullable: true - description: The employee's termination date. - example: '2021-10-12T00:00:00Z' - avatar: - type: string - format: uri - nullable: true - maxLength: 2000 - example: http://alturl.com/h2h8m - description: The URL of the employee's avatar image. - custom_fields: - type: object - additionalProperties: {} - nullable: true - description: Custom fields configured for a given model. - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /people - data: - - Varies by platform - x-merge-expands: '{"company": "Company", "employments": "Employment", "groups": - "Group", "home_location": "Location", "manager": "Employee", "pay_group": - "PayGroup", "team": "Team", "work_location": "Location"}' - x-merge-category: hris - EmployeeEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/EmployeeRequest' - required: - - model - x-merge-category: hris - EmployeePayrollRun: - type: object - description: |- - # The EmployeePayrollRun Object - ### Description - The `EmployeePayrollRun` object is used to represent an employee's pay statement for a specific payroll run. - - ### Usage Example - Fetch from the `LIST EmployeePayrollRun` endpoint and filter by `ID` to show all employee payroll runs. - properties: - id: - type: string - format: uuid - readOnly: true - example: fb8c55b6-1cb8-4b4c-9fb6-17924231619d - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee whose payroll is being run. - example: d2f972d0-2526-434b-9409-4c3b468e08f0 - x-merge-expands-to: Employee - payroll_run: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PayrollRun' - nullable: true - description: The payroll being run. - example: 35347df1-95e7-46e2-93cc-66f1191edca5 - x-merge-expands-to: PayrollRun - gross_pay: - type: number - format: double - nullable: true - description: The total earnings throughout a given period for an employee - before any deductions are made. - example: 1342.67 - net_pay: - type: number - format: double - nullable: true - description: The take-home pay throughout a given period for an employee - after deductions are made. - example: 865.78 - start_date: - type: string - format: date-time - nullable: true - description: The day and time the payroll run started. - example: '2020-11-08T00:00:00Z' - end_date: - type: string - format: date-time - nullable: true - description: The day and time the payroll run ended. - example: '2020-11-09T00:00:00Z' - check_date: - type: string - format: date-time - nullable: true - description: The day and time the payroll run was checked. - example: '2020-11-10T00:00:00Z' - earnings: - type: array - items: - $ref: '#/components/schemas/Earning' - readOnly: true - example: - - employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 - amount: 1002.34 - type: SALARY - - employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 - amount: 8342.34 - type: OVERTIME - deductions: - type: array - items: - $ref: '#/components/schemas/Deduction' - readOnly: true - example: - - employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 - name: Social Security - employee_deduction: 34.54 - company_deduction: 78.78 - taxes: - type: array - items: - $ref: '#/components/schemas/Tax' - readOnly: true - example: - - employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 - name: California State Income Tax - amount: 100.25 - employer_tax: 'False' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /employee-payroll - data: - - Varies by platform - x-merge-expands: '{"employee": "Employee", "payroll_run": "PayrollRun"}' - x-merge-category: hris - EmployeeRequest: - type: object - description: |- - # The Employee Object - ### Description - The `Employee` object is used to represent any person who has been employed by a company. By default, it returns all employees. To filter for only active employees, set the `employment_status` query parameter to `ACTIVE`. - - ### Usage Example - Fetch from the `LIST Employee` endpoint and filter by `ID` to show all employees. - properties: - employee_number: - type: string - nullable: true - description: The employee's number that appears in the third-party integration's - UI. - example: '2' - company: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Company' - nullable: true - description: The ID of the employee's company. - example: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 - x-merge-expands-to: Company - first_name: - type: string - nullable: true - description: The employee's first name. - example: Greg - last_name: - type: string - nullable: true - description: The employee's last name. - example: Hirsch - preferred_name: - type: string - nullable: true - description: The employee's preferred first name. - example: Greg the egg - display_full_name: - type: string - nullable: true - description: The employee's full name, to use for display purposes. If a - preferred first name is available, the full name will include the preferred - first name. - example: Cousin Greg Hirsch - username: - type: string - nullable: true - description: The employee's username that appears in the remote UI. - example: cousingreg - groups: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Group' - nullable: true - example: - - 21a54124-397f-494d-985e-3c5b330b8a68 - x-merge-expands-to: Group - work_email: - type: string - format: email - nullable: true - description: The employee's work email. - maxLength: 254 - example: greg@merge.dev - personal_email: - type: string - format: email - nullable: true - description: The employee's personal email. - maxLength: 254 - example: greg@gmail.com - mobile_phone_number: - type: string - nullable: true - description: The employee's mobile phone number. - example: '+1234567890' - employments: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employment' - nullable: true - example: - - 17a54124-287f-494d-965e-3c5b330c9a68 - description: Array of `Employment` IDs for this Employee. - x-merge-expands-to: Employment - home_location: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Location' - nullable: true - description: The employee's home address. - example: d2f972d0-2526-434b-9409-4c3b468e08f0 - x-merge-expands-to: Location - work_location: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Location' - nullable: true - description: The employee's work address. - example: 9efbc633-3387-4306-aa55-e2c635e6bb4f - x-merge-expands-to: Location - manager: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee ID of the employee's manager. - example: 0048ea5b-911e-4dff-9364-92070dea62ff - x-merge-expands-to: Employee - team: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Team' - nullable: true - description: The employee's team. - deprecated: true - x-merge-expands-to: Team - pay_group: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PayGroup' - nullable: true - description: The employee's pay group - example: ad1264e2-39be-4787-b749-f1aade9e3405 - x-merge-expands-to: PayGroup - ssn: - type: string - nullable: true - description: The employee's social security number. - maxLength: 100 - example: '1234567890' - gender: - oneOf: - - $ref: '#/components/schemas/GenderEnum' - - type: string - nullable: true - description: |- - The employee's gender. - - * `MALE` - MALE - * `FEMALE` - FEMALE - * `NON-BINARY` - NON-BINARY - * `OTHER` - OTHER - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - example: MALE - ethnicity: - oneOf: - - $ref: '#/components/schemas/EthnicityEnum' - - type: string - nullable: true - description: |- - The employee's ethnicity. - - * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE - * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT - * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN - * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO - * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES - * `WHITE` - WHITE - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - example: WHITE - marital_status: - oneOf: - - $ref: '#/components/schemas/MaritalStatusEnum' - - type: string - nullable: true - description: |- - The employee's filing status as related to marital status. - - * `SINGLE` - SINGLE - * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY - * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY - * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD - * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD - example: SINGLE - date_of_birth: - type: string - format: date-time - nullable: true - description: The employee's date of birth. - example: '1990-11-10T00:00:00Z' - hire_date: - type: string - format: date-time - nullable: true - description: "The date that the employee was hired, usually the day that - an offer letter is signed. If an employee has multiple hire dates from - previous employments, this represents the most recent hire date. Note: - If you're looking for the employee's start date, refer to the start_date - field." - deprecated: true - example: '2020-10-10T00:00:00Z' - start_date: - type: string - format: date-time - nullable: true - description: The date that the employee started working. If an employee - was rehired, the most recent start date will be returned. - example: '2020-10-11T00:00:00Z' - employment_status: - oneOf: - - $ref: '#/components/schemas/EmploymentStatusEnum' - - type: string - nullable: true - description: |- - The employment status of the employee. - - * `ACTIVE` - ACTIVE - * `PENDING` - PENDING - * `INACTIVE` - INACTIVE - example: INACTIVE - termination_date: - type: string - format: date-time - nullable: true - description: The employee's termination date. - example: '2021-10-12T00:00:00Z' - avatar: - type: string - format: uri - nullable: true - maxLength: 2000 - example: http://alturl.com/h2h8m - description: The URL of the employee's avatar image. - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"company": "Company", "employments": "Employment", "groups": - "Group", "home_location": "Location", "manager": "Employee", "pay_group": - "PayGroup", "team": "Team", "work_location": "Location"}' - x-merge-category: hris - EmployeeResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Employee' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: hris - EmployerBenefit: - type: object - description: |- - # The EmployerBenefit Object - ### Description - The `Employer Benefit` object is used to represent a benefit plan offered by a company. - - ### Usage Example - Fetch from the `LIST EmployerBenefits` endpoint and filter by `ID` to show all EmployerBenefits. - properties: - id: - type: string - format: uuid - readOnly: true - example: 025fjlc6-6000-430a-848e-aafacbadf4fele - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202939' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - benefit_plan_type: - oneOf: - - $ref: '#/components/schemas/BenefitPlanTypeEnum' - - type: string - nullable: true - description: |- - The type of benefit plan. - - * `MEDICAL` - MEDICAL - * `HEALTH_SAVINGS` - HEALTH_SAVINGS - * `INSURANCE` - INSURANCE - * `RETIREMENT` - RETIREMENT - * `OTHER` - OTHER - example: MEDICAL - name: - type: string - nullable: true - description: The employer benefit's name - typically the carrier or network - name. - maxLength: 200 - example: Kaiser Permanente Medical Plan - description: - type: string - nullable: true - description: The employer benefit's description. - maxLength: 2000 - example: HDHP Silver Plan - deduction_code: - type: string - nullable: true - description: The employer benefit's deduction code. - maxLength: 60 - example: COL - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - x-merge-category: hris - Employment: - type: object - description: |- - # The Employment Object - ### Description - The `Employment` object is used to represent a job position at a company. - - If an integration supports historical tracking of employments, it will be reflected in the data. If not, a new `Employment` object will be created whenever there is a change in job title or pay. The `effective_date` field should be used to order `Employment` objects, with the most recent date corresponding to the latest employment record for an employee. - - ### Usage Example - Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employees. - properties: - id: - type: string - format: uuid - readOnly: true - example: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee holding this position. - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - x-merge-expands-to: Employee - job_title: - type: string - nullable: true - description: The position's title. - example: Executive Assistant to Tom Wambsgans - pay_rate: - type: number - format: double - nullable: true - description: The position's pay rate. - example: '50000.00' - pay_period: - oneOf: - - $ref: '#/components/schemas/PayPeriodEnum' - - type: string - nullable: true - description: |- - The time period this pay rate encompasses. - - * `HOUR` - HOUR - * `DAY` - DAY - * `WEEK` - WEEK - * `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS - * `SEMIMONTHLY` - SEMIMONTHLY - * `MONTH` - MONTH - * `QUARTER` - QUARTER - * `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS - * `YEAR` - YEAR - example: YEAR - pay_frequency: - oneOf: - - $ref: '#/components/schemas/PayFrequencyEnum' - - type: string - nullable: true - description: |- - The position's pay frequency. - - * `WEEKLY` - WEEKLY - * `BIWEEKLY` - BIWEEKLY - * `MONTHLY` - MONTHLY - * `QUARTERLY` - QUARTERLY - * `SEMIANNUALLY` - SEMIANNUALLY - * `ANNUALLY` - ANNUALLY - * `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY - * `PRO_RATA` - PRO_RATA - * `SEMIMONTHLY` - SEMIMONTHLY - example: BIWEEKLY - pay_currency: - oneOf: - - $ref: '#/components/schemas/PayCurrencyEnum' - - type: string - nullable: true - description: |- - The position's currency code. - - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - example: USD - pay_group: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/PayGroup' - nullable: true - description: The employment's pay group - example: d4e4837f-9900-484c-ac40-528365bb08ef - x-merge-expands-to: PayGroup - flsa_status: - oneOf: - - $ref: '#/components/schemas/FlsaStatusEnum' - - type: string - nullable: true - description: |- - The position's FLSA status. - - * `EXEMPT` - EXEMPT - * `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT - * `NONEXEMPT` - NONEXEMPT - * `OWNER` - OWNER - example: EXEMPT - effective_date: - type: string - format: date-time - nullable: true - description: The position's effective date. - example: '2023-10-06T18:42:34Z' - employment_type: - oneOf: - - $ref: '#/components/schemas/EmploymentTypeEnum' - - type: string - nullable: true - description: |- - The position's type of employment. - - * `FULL_TIME` - FULL_TIME - * `PART_TIME` - PART_TIME - * `INTERN` - INTERN - * `CONTRACTOR` - CONTRACTOR - * `FREELANCE` - FREELANCE - example: FULL TIME - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /jobs - data: - - Varies by platform - x-merge-nested-write-allowed: true - x-merge-expands: '{"employee": "Employee", "pay_group": "PayGroup"}' - x-merge-category: hris - EmploymentStatusEnum: - enum: - - ACTIVE - - PENDING - - INACTIVE - type: string - description: |- - * `ACTIVE` - ACTIVE - * `PENDING` - PENDING - * `INACTIVE` - INACTIVE - x-merge-category: hris - EmploymentTypeEnum: - enum: - - FULL_TIME - - PART_TIME - - INTERN - - CONTRACTOR - - FREELANCE - type: string - description: |- - * `FULL_TIME` - FULL_TIME - * `PART_TIME` - PART_TIME - * `INTERN` - INTERN - * `CONTRACTOR` - CONTRACTOR - * `FREELANCE` - FREELANCE - x-merge-category: hris - EnabledActionsEnum: - enum: - - READ - - WRITE - type: string - description: |- - * `READ` - READ - * `WRITE` - WRITE - x-merge-category: hris - EncodingEnum: - enum: - - RAW - - BASE64 - - GZIP_BASE64 - type: string - description: |- - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - x-merge-category: hris - EndUserDetailsRequest: - type: object - properties: - end_user_email_address: - type: string - minLength: 1 - description: Your end user's email address. This is purely for identification - purposes - setting this value will not cause any emails to be sent. - maxLength: 100 - example: example@gmail.com - end_user_organization_name: - type: string - minLength: 1 - description: Your end user's organization. - maxLength: 100 - example: Test Organization - end_user_origin_id: - type: string - minLength: 1 - description: This unique identifier typically represents the ID for your - end user in your product's database. This value must be distinct from - other Linked Accounts' unique identifiers. - maxLength: 100 - example: '12345' - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - description: The integration categories to show in Merge Link. - example: - - hris - - ats - integration: - type: string - nullable: true - minLength: 1 - description: The slug of a specific pre-selected integration for this linking - flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. - example: bamboohr - link_expiry_mins: - type: integer - maximum: 10080 - minimum: 30 - default: 30 - description: An integer number of minutes between [30, 720 or 10080 if for - a Magic Link URL] for how long this token is valid. Defaults to 30. - should_create_magic_link_url: - type: boolean - nullable: true - default: false - description: Whether to generate a Magic Link URL. Defaults to false. For - more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - hide_admin_magic_link: - type: boolean - nullable: true - default: false - description: Whether to generate a Magic Link URL on the Admin Needed screen - during the linking flow. Defaults to false. For more information on Magic - Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - common_models: - type: array - items: - $ref: '#/components/schemas/CommonModelScopesBodyRequest' - nullable: true - description: An array of objects to specify the models and fields that will - be disabled for a given Linked Account. Each object uses model_id, enabled_actions, - and disabled_fields to specify the model, method, and fields that are - scoped for a given Linked Account. - category_common_model_scopes: - type: object - additionalProperties: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' - nullable: true - description: When creating a Link Token, you can set permissions for Common - Models that will apply to the account that is going to be linked. Any - model or field not specified in link token payload will default to existing - settings. - example: - hris: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - field_permissions: - enabled_fields: - - first_name - - last_name - - personal_email - disabled_fields: - - preferred_name - - model_name: Employment - model_permissions: - READ: - is_enabled: false - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - effective_date - ats: - - model_name: Job - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - field_permissions: - enabled_fields: - - name - disabled_fields: - - description - - model_name: Department - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - language: - oneOf: - - $ref: '#/components/schemas/LanguageEnum' - - type: string - nullable: true - description: |- - The following subset of IETF language tags can be used to configure localization. - - * `en` - en - * `de` - de - example: en - are_syncs_disabled: - type: boolean - nullable: true - default: false - description: The boolean that indicates whether initial, periodic, and force - syncs will be disabled. - integration_specific_config: - type: object - additionalProperties: {} - nullable: true - description: A JSON object containing integration-specific configuration - options. - example: - rippling: - oauth_code: 3h1jj8ssdf31dfji3o1jjdfjasd - required: - - categories - - end_user_email_address - - end_user_organization_name - - end_user_origin_id - x-merge-category: hris - ErrorValidationProblem: - type: object - properties: - source: - $ref: '#/components/schemas/ValidationProblemSource' - example: - pointer: /model/custom_fields - title: - type: string - example: Missing Required Field - detail: - type: string - example: custom_fields is a required field on model. - problem_type: - type: string - example: MISSING_REQUIRED_FIELD - required: - - detail - - problem_type - - title - x-merge-category: hris - EthnicityEnum: - enum: - - AMERICAN_INDIAN_OR_ALASKA_NATIVE - - ASIAN_OR_INDIAN_SUBCONTINENT - - BLACK_OR_AFRICAN_AMERICAN - - HISPANIC_OR_LATINO - - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - - TWO_OR_MORE_RACES - - WHITE - - PREFER_NOT_TO_DISCLOSE - type: string - description: |- - * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE - * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT - * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN - * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO - * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES - * `WHITE` - WHITE - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - x-merge-category: hris - EventTypeEnum: - enum: - - CREATED_REMOTE_PRODUCTION_API_KEY - - DELETED_REMOTE_PRODUCTION_API_KEY - - CREATED_TEST_API_KEY - - DELETED_TEST_API_KEY - - REGENERATED_PRODUCTION_API_KEY - - REGENERATED_WEBHOOK_SIGNATURE - - INVITED_USER - - TWO_FACTOR_AUTH_ENABLED - - TWO_FACTOR_AUTH_DISABLED - - DELETED_LINKED_ACCOUNT - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - CREATED_DESTINATION - - DELETED_DESTINATION - - CHANGED_DESTINATION - - CHANGED_SCOPES - - CHANGED_PERSONAL_INFORMATION - - CHANGED_ORGANIZATION_SETTINGS - - ENABLED_INTEGRATION - - DISABLED_INTEGRATION - - ENABLED_CATEGORY - - DISABLED_CATEGORY - - CHANGED_PASSWORD - - RESET_PASSWORD - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - FORCED_LINKED_ACCOUNT_RESYNC - - MUTED_ISSUE - - GENERATED_MAGIC_LINK - - ENABLED_MERGE_WEBHOOK - - DISABLED_MERGE_WEBHOOK - - MERGE_WEBHOOK_TARGET_CHANGED - - END_USER_CREDENTIALS_ACCESSED - type: string - description: |- - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - * `INVITED_USER` - INVITED_USER - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - * `CREATED_DESTINATION` - CREATED_DESTINATION - * `DELETED_DESTINATION` - DELETED_DESTINATION - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - * `CHANGED_SCOPES` - CHANGED_SCOPES - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - * `RESET_PASSWORD` - RESET_PASSWORD - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - * `MUTED_ISSUE` - MUTED_ISSUE - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - x-merge-category: hris - ExternalTargetFieldAPI: - type: object - properties: - name: - type: string - nullable: true - readOnly: true - example: example_target_field_name - description: - type: string - nullable: true - readOnly: true - example: this is a example description of a target field - is_mapped: - type: string - nullable: true - readOnly: true - example: true - x-merge-category: hris - ExternalTargetFieldAPIResponse: - type: object - properties: - Benefit: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - EmployerBenefit: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Company: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - EmployeePayrollRun: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Employee: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Employment: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Location: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - PayrollRun: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Team: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - TimeOff: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - TimeOffBalance: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - BankInfo: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - PayGroup: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Group: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Dependent: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - TimesheetEntry: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - x-merge-category: hris - FieldMappingApiInstance: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: - type: boolean - readOnly: true - target_field: - type: object - properties: - name: - type: string - description: - type: string - is_organization_wide: - type: boolean - required: - - description - - is_organization_wide - - name - nullable: true - readOnly: true - example: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - type: object - properties: - remote_key_name: - type: string - nullable: true - schema: - type: object - additionalProperties: {} - nullable: true - remote_endpoint_info: - type: object - properties: - method: - type: string - nullable: true - url_path: - type: string - nullable: true - field_traversal_path: - type: array - items: - type: string - nullable: true - required: - - field_traversal_path - - method - - url_path - required: - - remote_endpoint_info - - remote_key_name - - schema - nullable: true - readOnly: true - example: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - x-merge-category: hris - FieldMappingApiInstanceResponse: - type: object - properties: - Benefit: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - EmployerBenefit: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Company: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - EmployeePayrollRun: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Employee: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Employment: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Location: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - PayrollRun: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Team: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - TimeOff: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - TimeOffBalance: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - BankInfo: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - PayGroup: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Group: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Dependent: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - TimesheetEntry: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - x-merge-category: hris - FieldMappingInstanceResponse: - type: object - properties: - model: - $ref: '#/components/schemas/FieldMappingApiInstance' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: hris - FieldPermissionDeserializer: - type: object - properties: - enabled_fields: - type: array - items: {} - disabled_fields: - type: array - items: {} - x-merge-category: hris - FieldPermissionDeserializerRequest: - type: object - properties: - enabled_fields: - type: array - items: {} - disabled_fields: - type: array - items: {} - x-merge-category: hris - FlsaStatusEnum: - enum: - - EXEMPT - - SALARIED_NONEXEMPT - - NONEXEMPT - - OWNER - type: string - description: |- - * `EXEMPT` - EXEMPT - * `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT - * `NONEXEMPT` - NONEXEMPT - * `OWNER` - OWNER - x-merge-category: hris - GenderEnum: - enum: - - MALE - - FEMALE - - NON-BINARY - - OTHER - - PREFER_NOT_TO_DISCLOSE - type: string - description: |- - * `MALE` - MALE - * `FEMALE` - FEMALE - * `NON-BINARY` - NON-BINARY - * `OTHER` - OTHER - * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - x-merge-category: hris - GenerateRemoteKeyRequest: - type: object - description: |- - # The GenerateRemoteKey Object - ### Description - The `GenerateRemoteKey` object is used to represent a request for a new remote key. - - ### Usage Example - Post a `GenerateRemoteKey` to create a new remote key. - properties: - name: - type: string - minLength: 1 - description: The name of the remote key - example: Remote Deployment Key 1 - required: - - name - x-merge-category: hris - Group: - type: object - description: |- - # The Group Object - ### Description - The `Group` object is used to represent any subset of employees across, for example, `DEPARTMENT` or `TEAM`. Employees can be in multiple Groups. - - ### Usage Example - Fetch from the `LIST Employee` endpoint and expand groups to view an employee's groups. - properties: - id: - type: string - format: uuid - readOnly: true - example: 134e0111-0f67-44f6-98f0-597000290bb3 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '800293' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - parent_group: - type: string - format: uuid - nullable: true - description: The parent group for this group. - example: 2ef51b11-2c4e-4b02-8d1d-50592d9e96ef - name: - type: string - nullable: true - description: The group name. - example: COST_CENTER_US - type: - oneOf: - - $ref: '#/components/schemas/GroupTypeEnum' - - type: string - nullable: true - description: |- - The Group type returned directly from the third-party. - - * `TEAM` - TEAM - * `DEPARTMENT` - DEPARTMENT - * `COST_CENTER` - COST_CENTER - * `BUSINESS_UNIT` - BUSINESS_UNIT - * `GROUP` - GROUP - example: COST_CENTER - is_commonly_used_as_team: - type: boolean - nullable: true - description: Indicates whether the Group refers to a team in the third party - platform. Note that this is an opinionated view based on how Merge observes - most organizations representing teams in each third party platform. If - your customer uses a platform different from most, there is a chance this - will not be correct. - example: true - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /group - data: - - Varies by platform - x-merge-expands: '{"child_groups": "Group"}' - x-merge-category: hris - GroupTypeEnum: - enum: - - TEAM - - DEPARTMENT - - COST_CENTER - - BUSINESS_UNIT - - GROUP - type: string - description: |- - * `TEAM` - TEAM - * `DEPARTMENT` - DEPARTMENT - * `COST_CENTER` - COST_CENTER - * `BUSINESS_UNIT` - BUSINESS_UNIT - * `GROUP` - GROUP - x-merge-category: hris - IgnoreCommonModelRequest: - type: object - properties: - reason: - oneOf: - - $ref: '#/components/schemas/ReasonEnum' - - type: string - example: GENERAL_CUSTOMER_REQUEST - message: - type: string - minLength: 1 - maxLength: 256 - example: deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39 - required: - - reason - x-merge-category: hris - IndividualCommonModelScopeDeserializer: - type: object - properties: - model_name: - type: string - model_permissions: - type: object - additionalProperties: - $ref: '#/components/schemas/ModelPermissionDeserializer' - field_permissions: - $ref: '#/components/schemas/FieldPermissionDeserializer' - required: - - model_name - x-merge-category: hris - IndividualCommonModelScopeDeserializerRequest: - type: object - properties: - model_name: - type: string - minLength: 1 - model_permissions: - type: object - additionalProperties: - $ref: '#/components/schemas/ModelPermissionDeserializerRequest' - field_permissions: - $ref: '#/components/schemas/FieldPermissionDeserializerRequest' - required: - - model_name - x-merge-category: hris - Issue: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: - oneOf: - - $ref: '#/components/schemas/IssueStatusEnum' - - type: string - description: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - example: ONGOING - error_description: - type: string - example: Missing Permissions - end_user: - type: object - additionalProperties: {} - readOnly: true - example: b82302de-852e-4e60-b050-edf9da3b7c02 - first_incident_time: - type: string - format: date-time - nullable: true - example: '2022-12-05T16:19:15.161Z' - last_incident_time: - type: string - format: date-time - nullable: true - example: '2022-12-05T16:19:15.161Z' - is_muted: - type: boolean - readOnly: true - example: true - error_details: - type: array - items: - type: string - readOnly: true - example: - - Missing employee permissions. - - Missing time off permissions. - required: - - error_description - x-merge-category: hris - IssueStatusEnum: - enum: - - ONGOING - - RESOLVED - type: string - description: |- - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - x-merge-category: hris - LanguageEnum: - enum: - - en - - de - type: string - description: |- - * `en` - en - * `de` - de - x-merge-category: hris - LastSyncResultEnum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - type: string - description: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - x-merge-category: hris - LinkToken: - type: object - properties: - link_token: - type: string - example: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 - integration_name: - type: string - example: Lever - magic_link_url: - type: string - example: https://link.merge.dev/asdfjkl12345jsndfgi2i83n - required: - - link_token - x-merge-category: hris - LinkedAccountCommonModelScopeDeserializerRequest: - type: object - properties: - common_models: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' - description: The common models you want to update the scopes for - example: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - home_location - disabled_fields: - - work_location - - model_name: Benefit - model_permissions: - WRITE: - is_enabled: false - required: - - common_models - x-merge-category: hris - LinkedAccountStatus: - type: object - properties: - linked_account_status: - type: string - can_make_request: - type: boolean - required: - - can_make_request - - linked_account_status - x-merge-category: hris - Location: - type: object - description: |- - # The Location Object - ### Description - The `Location` object is used to represent an address that can be associated with an employee. - - ### Usage Example - Fetch from the `LIST Locations` endpoint and filter by `ID` to show all office locations. - properties: - id: - type: string - format: uuid - readOnly: true - example: f5e6a151-f44e-449a-afb1-8fd781905958 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '93018402' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The location's name. - example: NYC Office - phone_number: - type: string - nullable: true - description: The location's phone number. - example: '+1111111111' - street_1: - type: string - nullable: true - description: Line 1 of the location's street address. - example: 2920 Broadway - street_2: - type: string - nullable: true - description: Line 2 of the location's street address. - example: 2nd Floor - city: - type: string - nullable: true - description: The location's city. - example: 'New York ' - state: - type: string - nullable: true - description: The location's state. Represents a region if outside of the - US. - example: NY - zip_code: - type: string - nullable: true - description: The location's zip code or postal code. - example: '10027' - country: - oneOf: - - $ref: '#/components/schemas/CountryEnum' - - type: string - nullable: true - description: |- - The location's country. - - * `AF` - Afghanistan - * `AX` - Åland Islands - * `AL` - Albania - * `DZ` - Algeria - * `AS` - American Samoa - * `AD` - Andorra - * `AO` - Angola - * `AI` - Anguilla - * `AQ` - Antarctica - * `AG` - Antigua and Barbuda - * `AR` - Argentina - * `AM` - Armenia - * `AW` - Aruba - * `AU` - Australia - * `AT` - Austria - * `AZ` - Azerbaijan - * `BS` - Bahamas - * `BH` - Bahrain - * `BD` - Bangladesh - * `BB` - Barbados - * `BY` - Belarus - * `BE` - Belgium - * `BZ` - Belize - * `BJ` - Benin - * `BM` - Bermuda - * `BT` - Bhutan - * `BO` - Bolivia - * `BQ` - Bonaire, Sint Eustatius and Saba - * `BA` - Bosnia and Herzegovina - * `BW` - Botswana - * `BV` - Bouvet Island - * `BR` - Brazil - * `IO` - British Indian Ocean Territory - * `BN` - Brunei - * `BG` - Bulgaria - * `BF` - Burkina Faso - * `BI` - Burundi - * `CV` - Cabo Verde - * `KH` - Cambodia - * `CM` - Cameroon - * `CA` - Canada - * `KY` - Cayman Islands - * `CF` - Central African Republic - * `TD` - Chad - * `CL` - Chile - * `CN` - China - * `CX` - Christmas Island - * `CC` - Cocos (Keeling) Islands - * `CO` - Colombia - * `KM` - Comoros - * `CG` - Congo - * `CD` - Congo (the Democratic Republic of the) - * `CK` - Cook Islands - * `CR` - Costa Rica - * `CI` - Côte d'Ivoire - * `HR` - Croatia - * `CU` - Cuba - * `CW` - Curaçao - * `CY` - Cyprus - * `CZ` - Czechia - * `DK` - Denmark - * `DJ` - Djibouti - * `DM` - Dominica - * `DO` - Dominican Republic - * `EC` - Ecuador - * `EG` - Egypt - * `SV` - El Salvador - * `GQ` - Equatorial Guinea - * `ER` - Eritrea - * `EE` - Estonia - * `SZ` - Eswatini - * `ET` - Ethiopia - * `FK` - Falkland Islands (Malvinas) - * `FO` - Faroe Islands - * `FJ` - Fiji - * `FI` - Finland - * `FR` - France - * `GF` - French Guiana - * `PF` - French Polynesia - * `TF` - French Southern Territories - * `GA` - Gabon - * `GM` - Gambia - * `GE` - Georgia - * `DE` - Germany - * `GH` - Ghana - * `GI` - Gibraltar - * `GR` - Greece - * `GL` - Greenland - * `GD` - Grenada - * `GP` - Guadeloupe - * `GU` - Guam - * `GT` - Guatemala - * `GG` - Guernsey - * `GN` - Guinea - * `GW` - Guinea-Bissau - * `GY` - Guyana - * `HT` - Haiti - * `HM` - Heard Island and McDonald Islands - * `VA` - Holy See - * `HN` - Honduras - * `HK` - Hong Kong - * `HU` - Hungary - * `IS` - Iceland - * `IN` - India - * `ID` - Indonesia - * `IR` - Iran - * `IQ` - Iraq - * `IE` - Ireland - * `IM` - Isle of Man - * `IL` - Israel - * `IT` - Italy - * `JM` - Jamaica - * `JP` - Japan - * `JE` - Jersey - * `JO` - Jordan - * `KZ` - Kazakhstan - * `KE` - Kenya - * `KI` - Kiribati - * `KW` - Kuwait - * `KG` - Kyrgyzstan - * `LA` - Laos - * `LV` - Latvia - * `LB` - Lebanon - * `LS` - Lesotho - * `LR` - Liberia - * `LY` - Libya - * `LI` - Liechtenstein - * `LT` - Lithuania - * `LU` - Luxembourg - * `MO` - Macao - * `MG` - Madagascar - * `MW` - Malawi - * `MY` - Malaysia - * `MV` - Maldives - * `ML` - Mali - * `MT` - Malta - * `MH` - Marshall Islands - * `MQ` - Martinique - * `MR` - Mauritania - * `MU` - Mauritius - * `YT` - Mayotte - * `MX` - Mexico - * `FM` - Micronesia (Federated States of) - * `MD` - Moldova - * `MC` - Monaco - * `MN` - Mongolia - * `ME` - Montenegro - * `MS` - Montserrat - * `MA` - Morocco - * `MZ` - Mozambique - * `MM` - Myanmar - * `NA` - Namibia - * `NR` - Nauru - * `NP` - Nepal - * `NL` - Netherlands - * `NC` - New Caledonia - * `NZ` - New Zealand - * `NI` - Nicaragua - * `NE` - Niger - * `NG` - Nigeria - * `NU` - Niue - * `NF` - Norfolk Island - * `KP` - North Korea - * `MK` - North Macedonia - * `MP` - Northern Mariana Islands - * `NO` - Norway - * `OM` - Oman - * `PK` - Pakistan - * `PW` - Palau - * `PS` - Palestine, State of - * `PA` - Panama - * `PG` - Papua New Guinea - * `PY` - Paraguay - * `PE` - Peru - * `PH` - Philippines - * `PN` - Pitcairn - * `PL` - Poland - * `PT` - Portugal - * `PR` - Puerto Rico - * `QA` - Qatar - * `RE` - Réunion - * `RO` - Romania - * `RU` - Russia - * `RW` - Rwanda - * `BL` - Saint Barthélemy - * `SH` - Saint Helena, Ascension and Tristan da Cunha - * `KN` - Saint Kitts and Nevis - * `LC` - Saint Lucia - * `MF` - Saint Martin (French part) - * `PM` - Saint Pierre and Miquelon - * `VC` - Saint Vincent and the Grenadines - * `WS` - Samoa - * `SM` - San Marino - * `ST` - Sao Tome and Principe - * `SA` - Saudi Arabia - * `SN` - Senegal - * `RS` - Serbia - * `SC` - Seychelles - * `SL` - Sierra Leone - * `SG` - Singapore - * `SX` - Sint Maarten (Dutch part) - * `SK` - Slovakia - * `SI` - Slovenia - * `SB` - Solomon Islands - * `SO` - Somalia - * `ZA` - South Africa - * `GS` - South Georgia and the South Sandwich Islands - * `KR` - South Korea - * `SS` - South Sudan - * `ES` - Spain - * `LK` - Sri Lanka - * `SD` - Sudan - * `SR` - Suriname - * `SJ` - Svalbard and Jan Mayen - * `SE` - Sweden - * `CH` - Switzerland - * `SY` - Syria - * `TW` - Taiwan - * `TJ` - Tajikistan - * `TZ` - Tanzania - * `TH` - Thailand - * `TL` - Timor-Leste - * `TG` - Togo - * `TK` - Tokelau - * `TO` - Tonga - * `TT` - Trinidad and Tobago - * `TN` - Tunisia - * `TR` - Turkey - * `TM` - Turkmenistan - * `TC` - Turks and Caicos Islands - * `TV` - Tuvalu - * `UG` - Uganda - * `UA` - Ukraine - * `AE` - United Arab Emirates - * `GB` - United Kingdom - * `UM` - United States Minor Outlying Islands - * `US` - United States of America - * `UY` - Uruguay - * `UZ` - Uzbekistan - * `VU` - Vanuatu - * `VE` - Venezuela - * `VN` - Vietnam - * `VG` - Virgin Islands (British) - * `VI` - Virgin Islands (U.S.) - * `WF` - Wallis and Futuna - * `EH` - Western Sahara - * `YE` - Yemen - * `ZM` - Zambia - * `ZW` - Zimbabwe - example: US - location_type: - oneOf: - - $ref: '#/components/schemas/LocationTypeEnum' - - type: string - nullable: true - description: |- - The location's type. Can be either WORK or HOME - - * `HOME` - HOME - * `WORK` - WORK - example: WORK - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /locations - data: - - Varies by platform - x-merge-category: hris - LocationTypeEnum: - enum: - - HOME - - WORK - type: string - description: |- - * `HOME` - HOME - * `WORK` - WORK - x-merge-category: hris - MaritalStatusEnum: - enum: - - SINGLE - - MARRIED_FILING_JOINTLY - - MARRIED_FILING_SEPARATELY - - HEAD_OF_HOUSEHOLD - - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD - type: string - description: |- - * `SINGLE` - SINGLE - * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY - * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY - * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD - * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD - x-merge-category: hris - MetaResponse: - type: object - properties: - request_schema: - type: object - additionalProperties: {} - example: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - type: object - additionalProperties: {} - status: - $ref: '#/components/schemas/LinkedAccountStatus' - example: - linked_account_status: COMPLETE - can_make_request: true - has_conditional_params: - type: boolean - has_required_linked_account_params: - type: boolean - required: - - has_conditional_params - - has_required_linked_account_params - - request_schema - x-merge-category: hris - MethodEnum: - enum: - - GET - - OPTIONS - - HEAD - - POST - - PUT - - PATCH - - DELETE - type: string - description: |- - * `GET` - GET - * `OPTIONS` - OPTIONS - * `HEAD` - HEAD - * `POST` - POST - * `PUT` - PUT - * `PATCH` - PATCH - * `DELETE` - DELETE - x-merge-category: hris - ModelOperation: - type: object - description: |- - # The ModelOperation Object - ### Description - The `ModelOperation` object is used to represent the operations that are currently supported for a given model. - - ### Usage Example - View what operations are supported for the `Candidate` endpoint. - properties: - model_name: - type: string - example: Candidate - available_operations: - type: array - items: - type: string - example: - - FETCH - - CREATE - required_post_parameters: - type: array - items: - type: string - example: - - remote_user_id - supported_fields: - type: array - items: - type: string - example: - - first_name - - last_name - - company - - title - required: - - available_operations - - model_name - - required_post_parameters - - supported_fields - x-merge-category: hris - ModelPermissionDeserializer: - type: object - properties: - is_enabled: - type: boolean - x-merge-category: hris - ModelPermissionDeserializerRequest: - type: object - properties: - is_enabled: - type: boolean - x-merge-category: hris - MultipartFormFieldRequest: - type: object - description: |- - # The MultipartFormField Object - ### Description - The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. - - ### Usage Example - Create a `MultipartFormField` to define a multipart form entry. - properties: - name: - type: string - minLength: 1 - description: The name of the form field - example: resume - data: - type: string - minLength: 1 - description: The data for the form field. - example: SW50ZWdyYXRlIGZhc3QKSW50ZWdyYXRlIG9uY2U= - encoding: - oneOf: - - $ref: '#/components/schemas/EncodingEnum' - - type: string - nullable: true - default: RAW - description: |- - The encoding of the value of `data`. Defaults to `RAW` if not defined. - - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - example: BASE64 - $ref: '#/components/schemas/EncodingEnum' - file_name: - type: string - nullable: true - minLength: 1 - description: The file name of the form field, if the field is for a file. - example: resume.pdf - content_type: - type: string - nullable: true - minLength: 1 - description: The MIME type of the file, if the field is for a file. - example: application/pdf - required: - - data - - name - x-merge-category: hris - PaginatedAccountDetailsAndActionsList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/AccountDetailsAndActions' - x-merge-category: hris - PaginatedAuditLogEventList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/AuditLogEvent' - x-merge-category: hris - PaginatedBankInfoList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/BankInfo' - x-merge-category: hris - PaginatedBenefitList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Benefit' - x-merge-category: hris - PaginatedCompanyList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Company' - x-merge-category: hris - PaginatedDependentList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Dependent' - x-merge-category: hris - PaginatedEmployeeList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Employee' - x-merge-category: hris - PaginatedEmployeePayrollRunList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/EmployeePayrollRun' - x-merge-category: hris - PaginatedEmployerBenefitList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/EmployerBenefit' - x-merge-category: hris - PaginatedEmploymentList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Employment' - x-merge-category: hris - PaginatedGroupList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Group' - x-merge-category: hris - PaginatedIssueList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Issue' - x-merge-category: hris - PaginatedLocationList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Location' - x-merge-category: hris - PaginatedPayGroupList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/PayGroup' - x-merge-category: hris - PaginatedPayrollRunList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/PayrollRun' - x-merge-category: hris - PaginatedSyncStatusList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/SyncStatus' - x-merge-category: hris - PaginatedTeamList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Team' - x-merge-category: hris - PaginatedTimeOffBalanceList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/TimeOffBalance' - x-merge-category: hris - PaginatedTimeOffList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/TimeOff' - x-merge-category: hris - PaginatedTimesheetEntryList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/TimesheetEntry' - x-merge-category: hris - PatchedEditFieldMappingRequest: - type: object - properties: - remote_field_traversal_path: - type: array - items: {} - description: The field traversal path of the remote field listed when you - hit the GET /remote-fields endpoint. - example: - - example_remote_field_name - remote_method: - type: string - minLength: 1 - description: The method of the remote endpoint where the remote field is - coming from. - example: GET - remote_url_path: - type: string - minLength: 1 - description: The path of the remote endpoint where the remote field is coming - from. - example: /example-url-path - x-merge-category: hris - PayCurrencyEnum: - enum: - - XUA - - AFN - - AFA - - ALL - - ALK - - DZD - - ADP - - AOA - - AOK - - AON - - AOR - - ARA - - ARS - - ARM - - ARP - - ARL - - AMD - - AWG - - AUD - - ATS - - AZN - - AZM - - BSD - - BHD - - BDT - - BBD - - BYN - - BYB - - BYR - - BEF - - BEC - - BEL - - BZD - - BMD - - BTN - - BOB - - BOL - - BOV - - BOP - - BAM - - BAD - - BAN - - BWP - - BRC - - BRZ - - BRE - - BRR - - BRN - - BRB - - BRL - - GBP - - BND - - BGL - - BGN - - BGO - - BGM - - BUK - - BIF - - XPF - - KHR - - CAD - - CVE - - KYD - - XAF - - CLE - - CLP - - CLF - - CNX - - CNY - - CNH - - COP - - COU - - KMF - - CDF - - CRC - - HRD - - HRK - - CUC - - CUP - - CYP - - CZK - - CSK - - DKK - - DJF - - DOP - - NLG - - XCD - - DDM - - ECS - - ECV - - EGP - - GQE - - ERN - - EEK - - ETB - - EUR - - XBA - - XEU - - XBB - - XBC - - XBD - - FKP - - FJD - - FIM - - FRF - - XFO - - XFU - - GMD - - GEK - - GEL - - DEM - - GHS - - GHC - - GIP - - XAU - - GRD - - GTQ - - GWP - - GNF - - GNS - - GYD - - HTG - - HNL - - HKD - - HUF - - IMP - - ISK - - ISJ - - INR - - IDR - - IRR - - IQD - - IEP - - ILS - - ILP - - ILR - - ITL - - JMD - - JPY - - JOD - - KZT - - KES - - KWD - - KGS - - LAK - - LVL - - LVR - - LBP - - LSL - - LRD - - LYD - - LTL - - LTT - - LUL - - LUC - - LUF - - MOP - - MKD - - MKN - - MGA - - MGF - - MWK - - MYR - - MVR - - MVP - - MLF - - MTL - - MTP - - MRU - - MRO - - MUR - - MXV - - MXN - - MXP - - MDC - - MDL - - MCF - - MNT - - MAD - - MAF - - MZE - - MZN - - MZM - - MMK - - NAD - - NPR - - ANG - - TWD - - NZD - - NIO - - NIC - - NGN - - KPW - - NOK - - OMR - - PKR - - XPD - - PAB - - PGK - - PYG - - PEI - - PEN - - PES - - PHP - - XPT - - PLN - - PLZ - - PTE - - GWE - - QAR - - XRE - - RHD - - RON - - ROL - - RUB - - RUR - - RWF - - SVC - - WST - - SAR - - RSD - - CSD - - SCR - - SLL - - XAG - - SGD - - SKK - - SIT - - SBD - - SOS - - ZAR - - ZAL - - KRH - - KRW - - KRO - - SSP - - SUR - - ESP - - ESA - - ESB - - XDR - - LKR - - SHP - - XSU - - SDD - - SDG - - SDP - - SRD - - SRG - - SZL - - SEK - - CHF - - SYP - - STN - - STD - - TVD - - TJR - - TJS - - TZS - - XTS - - THB - - XXX - - TPE - - TOP - - TTD - - TND - - TRY - - TRL - - TMT - - TMM - - USD - - USN - - USS - - UGX - - UGS - - UAH - - UAK - - AED - - UYW - - UYU - - UYP - - UYI - - UZS - - VUV - - VES - - VEB - - VEF - - VND - - VNN - - CHE - - CHW - - XOF - - YDD - - YER - - YUN - - YUD - - YUM - - YUR - - ZWN - - ZRN - - ZRZ - - ZMW - - ZMK - - ZWD - - ZWR - - ZWL - type: string - description: |- - * `XUA` - ADB Unit of Account - * `AFN` - Afghan Afghani - * `AFA` - Afghan Afghani (1927–2002) - * `ALL` - Albanian Lek - * `ALK` - Albanian Lek (1946–1965) - * `DZD` - Algerian Dinar - * `ADP` - Andorran Peseta - * `AOA` - Angolan Kwanza - * `AOK` - Angolan Kwanza (1977–1991) - * `AON` - Angolan New Kwanza (1990–2000) - * `AOR` - Angolan Readjusted Kwanza (1995–1999) - * `ARA` - Argentine Austral - * `ARS` - Argentine Peso - * `ARM` - Argentine Peso (1881–1970) - * `ARP` - Argentine Peso (1983–1985) - * `ARL` - Argentine Peso Ley (1970–1983) - * `AMD` - Armenian Dram - * `AWG` - Aruban Florin - * `AUD` - Australian Dollar - * `ATS` - Austrian Schilling - * `AZN` - Azerbaijani Manat - * `AZM` - Azerbaijani Manat (1993–2006) - * `BSD` - Bahamian Dollar - * `BHD` - Bahraini Dinar - * `BDT` - Bangladeshi Taka - * `BBD` - Barbadian Dollar - * `BYN` - Belarusian Ruble - * `BYB` - Belarusian Ruble (1994–1999) - * `BYR` - Belarusian Ruble (2000–2016) - * `BEF` - Belgian Franc - * `BEC` - Belgian Franc (convertible) - * `BEL` - Belgian Franc (financial) - * `BZD` - Belize Dollar - * `BMD` - Bermudan Dollar - * `BTN` - Bhutanese Ngultrum - * `BOB` - Bolivian Boliviano - * `BOL` - Bolivian Boliviano (1863–1963) - * `BOV` - Bolivian Mvdol - * `BOP` - Bolivian Peso - * `BAM` - Bosnia-Herzegovina Convertible Mark - * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - * `BWP` - Botswanan Pula - * `BRC` - Brazilian Cruzado (1986–1989) - * `BRZ` - Brazilian Cruzeiro (1942–1967) - * `BRE` - Brazilian Cruzeiro (1990–1993) - * `BRR` - Brazilian Cruzeiro (1993–1994) - * `BRN` - Brazilian New Cruzado (1989–1990) - * `BRB` - Brazilian New Cruzeiro (1967–1986) - * `BRL` - Brazilian Real - * `GBP` - British Pound - * `BND` - Brunei Dollar - * `BGL` - Bulgarian Hard Lev - * `BGN` - Bulgarian Lev - * `BGO` - Bulgarian Lev (1879–1952) - * `BGM` - Bulgarian Socialist Lev - * `BUK` - Burmese Kyat - * `BIF` - Burundian Franc - * `XPF` - CFP Franc - * `KHR` - Cambodian Riel - * `CAD` - Canadian Dollar - * `CVE` - Cape Verdean Escudo - * `KYD` - Cayman Islands Dollar - * `XAF` - Central African CFA Franc - * `CLE` - Chilean Escudo - * `CLP` - Chilean Peso - * `CLF` - Chilean Unit of Account (UF) - * `CNX` - Chinese People’s Bank Dollar - * `CNY` - Chinese Yuan - * `CNH` - Chinese Yuan (offshore) - * `COP` - Colombian Peso - * `COU` - Colombian Real Value Unit - * `KMF` - Comorian Franc - * `CDF` - Congolese Franc - * `CRC` - Costa Rican Colón - * `HRD` - Croatian Dinar - * `HRK` - Croatian Kuna - * `CUC` - Cuban Convertible Peso - * `CUP` - Cuban Peso - * `CYP` - Cypriot Pound - * `CZK` - Czech Koruna - * `CSK` - Czechoslovak Hard Koruna - * `DKK` - Danish Krone - * `DJF` - Djiboutian Franc - * `DOP` - Dominican Peso - * `NLG` - Dutch Guilder - * `XCD` - East Caribbean Dollar - * `DDM` - East German Mark - * `ECS` - Ecuadorian Sucre - * `ECV` - Ecuadorian Unit of Constant Value - * `EGP` - Egyptian Pound - * `GQE` - Equatorial Guinean Ekwele - * `ERN` - Eritrean Nakfa - * `EEK` - Estonian Kroon - * `ETB` - Ethiopian Birr - * `EUR` - Euro - * `XBA` - European Composite Unit - * `XEU` - European Currency Unit - * `XBB` - European Monetary Unit - * `XBC` - European Unit of Account (XBC) - * `XBD` - European Unit of Account (XBD) - * `FKP` - Falkland Islands Pound - * `FJD` - Fijian Dollar - * `FIM` - Finnish Markka - * `FRF` - French Franc - * `XFO` - French Gold Franc - * `XFU` - French UIC-Franc - * `GMD` - Gambian Dalasi - * `GEK` - Georgian Kupon Larit - * `GEL` - Georgian Lari - * `DEM` - German Mark - * `GHS` - Ghanaian Cedi - * `GHC` - Ghanaian Cedi (1979–2007) - * `GIP` - Gibraltar Pound - * `XAU` - Gold - * `GRD` - Greek Drachma - * `GTQ` - Guatemalan Quetzal - * `GWP` - Guinea-Bissau Peso - * `GNF` - Guinean Franc - * `GNS` - Guinean Syli - * `GYD` - Guyanaese Dollar - * `HTG` - Haitian Gourde - * `HNL` - Honduran Lempira - * `HKD` - Hong Kong Dollar - * `HUF` - Hungarian Forint - * `IMP` - IMP - * `ISK` - Icelandic Króna - * `ISJ` - Icelandic Króna (1918–1981) - * `INR` - Indian Rupee - * `IDR` - Indonesian Rupiah - * `IRR` - Iranian Rial - * `IQD` - Iraqi Dinar - * `IEP` - Irish Pound - * `ILS` - Israeli New Shekel - * `ILP` - Israeli Pound - * `ILR` - Israeli Shekel (1980–1985) - * `ITL` - Italian Lira - * `JMD` - Jamaican Dollar - * `JPY` - Japanese Yen - * `JOD` - Jordanian Dinar - * `KZT` - Kazakhstani Tenge - * `KES` - Kenyan Shilling - * `KWD` - Kuwaiti Dinar - * `KGS` - Kyrgystani Som - * `LAK` - Laotian Kip - * `LVL` - Latvian Lats - * `LVR` - Latvian Ruble - * `LBP` - Lebanese Pound - * `LSL` - Lesotho Loti - * `LRD` - Liberian Dollar - * `LYD` - Libyan Dinar - * `LTL` - Lithuanian Litas - * `LTT` - Lithuanian Talonas - * `LUL` - Luxembourg Financial Franc - * `LUC` - Luxembourgian Convertible Franc - * `LUF` - Luxembourgian Franc - * `MOP` - Macanese Pataca - * `MKD` - Macedonian Denar - * `MKN` - Macedonian Denar (1992–1993) - * `MGA` - Malagasy Ariary - * `MGF` - Malagasy Franc - * `MWK` - Malawian Kwacha - * `MYR` - Malaysian Ringgit - * `MVR` - Maldivian Rufiyaa - * `MVP` - Maldivian Rupee (1947–1981) - * `MLF` - Malian Franc - * `MTL` - Maltese Lira - * `MTP` - Maltese Pound - * `MRU` - Mauritanian Ouguiya - * `MRO` - Mauritanian Ouguiya (1973–2017) - * `MUR` - Mauritian Rupee - * `MXV` - Mexican Investment Unit - * `MXN` - Mexican Peso - * `MXP` - Mexican Silver Peso (1861–1992) - * `MDC` - Moldovan Cupon - * `MDL` - Moldovan Leu - * `MCF` - Monegasque Franc - * `MNT` - Mongolian Tugrik - * `MAD` - Moroccan Dirham - * `MAF` - Moroccan Franc - * `MZE` - Mozambican Escudo - * `MZN` - Mozambican Metical - * `MZM` - Mozambican Metical (1980–2006) - * `MMK` - Myanmar Kyat - * `NAD` - Namibian Dollar - * `NPR` - Nepalese Rupee - * `ANG` - Netherlands Antillean Guilder - * `TWD` - New Taiwan Dollar - * `NZD` - New Zealand Dollar - * `NIO` - Nicaraguan Córdoba - * `NIC` - Nicaraguan Córdoba (1988–1991) - * `NGN` - Nigerian Naira - * `KPW` - North Korean Won - * `NOK` - Norwegian Krone - * `OMR` - Omani Rial - * `PKR` - Pakistani Rupee - * `XPD` - Palladium - * `PAB` - Panamanian Balboa - * `PGK` - Papua New Guinean Kina - * `PYG` - Paraguayan Guarani - * `PEI` - Peruvian Inti - * `PEN` - Peruvian Sol - * `PES` - Peruvian Sol (1863–1965) - * `PHP` - Philippine Peso - * `XPT` - Platinum - * `PLN` - Polish Zloty - * `PLZ` - Polish Zloty (1950–1995) - * `PTE` - Portuguese Escudo - * `GWE` - Portuguese Guinea Escudo - * `QAR` - Qatari Rial - * `XRE` - RINET Funds - * `RHD` - Rhodesian Dollar - * `RON` - Romanian Leu - * `ROL` - Romanian Leu (1952–2006) - * `RUB` - Russian Ruble - * `RUR` - Russian Ruble (1991–1998) - * `RWF` - Rwandan Franc - * `SVC` - Salvadoran Colón - * `WST` - Samoan Tala - * `SAR` - Saudi Riyal - * `RSD` - Serbian Dinar - * `CSD` - Serbian Dinar (2002–2006) - * `SCR` - Seychellois Rupee - * `SLL` - Sierra Leonean Leone - * `XAG` - Silver - * `SGD` - Singapore Dollar - * `SKK` - Slovak Koruna - * `SIT` - Slovenian Tolar - * `SBD` - Solomon Islands Dollar - * `SOS` - Somali Shilling - * `ZAR` - South African Rand - * `ZAL` - South African Rand (financial) - * `KRH` - South Korean Hwan (1953–1962) - * `KRW` - South Korean Won - * `KRO` - South Korean Won (1945–1953) - * `SSP` - South Sudanese Pound - * `SUR` - Soviet Rouble - * `ESP` - Spanish Peseta - * `ESA` - Spanish Peseta (A account) - * `ESB` - Spanish Peseta (convertible account) - * `XDR` - Special Drawing Rights - * `LKR` - Sri Lankan Rupee - * `SHP` - St. Helena Pound - * `XSU` - Sucre - * `SDD` - Sudanese Dinar (1992–2007) - * `SDG` - Sudanese Pound - * `SDP` - Sudanese Pound (1957–1998) - * `SRD` - Surinamese Dollar - * `SRG` - Surinamese Guilder - * `SZL` - Swazi Lilangeni - * `SEK` - Swedish Krona - * `CHF` - Swiss Franc - * `SYP` - Syrian Pound - * `STN` - São Tomé & Príncipe Dobra - * `STD` - São Tomé & Príncipe Dobra (1977–2017) - * `TVD` - TVD - * `TJR` - Tajikistani Ruble - * `TJS` - Tajikistani Somoni - * `TZS` - Tanzanian Shilling - * `XTS` - Testing Currency Code - * `THB` - Thai Baht - * `XXX` - The codes assigned for transactions where no currency is involved - * `TPE` - Timorese Escudo - * `TOP` - Tongan Paʻanga - * `TTD` - Trinidad & Tobago Dollar - * `TND` - Tunisian Dinar - * `TRY` - Turkish Lira - * `TRL` - Turkish Lira (1922–2005) - * `TMT` - Turkmenistani Manat - * `TMM` - Turkmenistani Manat (1993–2009) - * `USD` - US Dollar - * `USN` - US Dollar (Next day) - * `USS` - US Dollar (Same day) - * `UGX` - Ugandan Shilling - * `UGS` - Ugandan Shilling (1966–1987) - * `UAH` - Ukrainian Hryvnia - * `UAK` - Ukrainian Karbovanets - * `AED` - United Arab Emirates Dirham - * `UYW` - Uruguayan Nominal Wage Index Unit - * `UYU` - Uruguayan Peso - * `UYP` - Uruguayan Peso (1975–1993) - * `UYI` - Uruguayan Peso (Indexed Units) - * `UZS` - Uzbekistani Som - * `VUV` - Vanuatu Vatu - * `VES` - Venezuelan Bolívar - * `VEB` - Venezuelan Bolívar (1871–2008) - * `VEF` - Venezuelan Bolívar (2008–2018) - * `VND` - Vietnamese Dong - * `VNN` - Vietnamese Dong (1978–1985) - * `CHE` - WIR Euro - * `CHW` - WIR Franc - * `XOF` - West African CFA Franc - * `YDD` - Yemeni Dinar - * `YER` - Yemeni Rial - * `YUN` - Yugoslavian Convertible Dinar (1990–1992) - * `YUD` - Yugoslavian Hard Dinar (1966–1990) - * `YUM` - Yugoslavian New Dinar (1994–2002) - * `YUR` - Yugoslavian Reformed Dinar (1992–1993) - * `ZWN` - ZWN - * `ZRN` - Zairean New Zaire (1993–1998) - * `ZRZ` - Zairean Zaire (1971–1993) - * `ZMW` - Zambian Kwacha - * `ZMK` - Zambian Kwacha (1968–2012) - * `ZWD` - Zimbabwean Dollar (1980–2008) - * `ZWR` - Zimbabwean Dollar (2008) - * `ZWL` - Zimbabwean Dollar (2009) - x-merge-category: hris - PayFrequencyEnum: - enum: - - WEEKLY - - BIWEEKLY - - MONTHLY - - QUARTERLY - - SEMIANNUALLY - - ANNUALLY - - THIRTEEN-MONTHLY - - PRO_RATA - - SEMIMONTHLY - type: string - description: |- - * `WEEKLY` - WEEKLY - * `BIWEEKLY` - BIWEEKLY - * `MONTHLY` - MONTHLY - * `QUARTERLY` - QUARTERLY - * `SEMIANNUALLY` - SEMIANNUALLY - * `ANNUALLY` - ANNUALLY - * `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY - * `PRO_RATA` - PRO_RATA - * `SEMIMONTHLY` - SEMIMONTHLY - x-merge-category: hris - PayGroup: - type: object - description: |- - # The PayGroup Object - ### Description - The `PayGroup` object is used to represent a subset of employees that are put together for payroll processing purposes. - - ### Usage Example - Fetch from the `LIST PayGroup` endpoint and filter by `ID` to show all pay group information. - properties: - id: - type: string - format: uuid - readOnly: true - example: fd1e0fb5-8f92-4ec9-9f32-179cf732867d - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '800293' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - pay_group_name: - type: string - nullable: true - description: The pay group name. - example: contractor - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /pay-group - data: - - Varies by platform - x-merge-category: hris - PayPeriodEnum: - enum: - - HOUR - - DAY - - WEEK - - EVERY_TWO_WEEKS - - SEMIMONTHLY - - MONTH - - QUARTER - - EVERY_SIX_MONTHS - - YEAR - type: string - description: |- - * `HOUR` - HOUR - * `DAY` - DAY - * `WEEK` - WEEK - * `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS - * `SEMIMONTHLY` - SEMIMONTHLY - * `MONTH` - MONTH - * `QUARTER` - QUARTER - * `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS - * `YEAR` - YEAR - x-merge-category: hris - PayrollRun: - type: object - description: |- - # The PayrollRun Object - ### Description - The `PayrollRun` object is used to represent a group of pay statements for a specific pay schedule. - - ### Usage Example - Fetch from the `LIST PayrollRuns` endpoint and filter by `ID` to show all payroll runs. - properties: - id: - type: string - format: uuid - readOnly: true - example: 37336947-b3d4-4a4c-a310-ab6ab510e079 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - run_state: - oneOf: - - $ref: '#/components/schemas/RunStateEnum' - - type: string - nullable: true - description: |- - The state of the payroll run - - * `PAID` - PAID - * `DRAFT` - DRAFT - * `APPROVED` - APPROVED - * `FAILED` - FAILED - * `CLOSED` - CLOSED - example: PAID - run_type: - oneOf: - - $ref: '#/components/schemas/RunTypeEnum' - - type: string - nullable: true - description: |- - The type of the payroll run - - * `REGULAR` - REGULAR - * `OFF_CYCLE` - OFF_CYCLE - * `CORRECTION` - CORRECTION - * `TERMINATION` - TERMINATION - * `SIGN_ON_BONUS` - SIGN_ON_BONUS - example: REGULAR - start_date: - type: string - format: date-time - nullable: true - description: The day and time the payroll run started. - example: '2020-11-08T00:00:00Z' - end_date: - type: string - format: date-time - nullable: true - description: The day and time the payroll run ended. - example: '2020-11-15T00:00:00Z' - check_date: - type: string - format: date-time - nullable: true - description: The day and time the payroll run was checked. - example: '2020-11-15T00:00:00Z' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /payroll - data: - - Varies by platform - x-merge-category: hris - PolicyTypeEnum: - enum: - - VACATION - - SICK - - PERSONAL - - JURY_DUTY - - VOLUNTEER - - BEREAVEMENT - type: string - description: |- - * `VACATION` - VACATION - * `SICK` - SICK - * `PERSONAL` - PERSONAL - * `JURY_DUTY` - JURY_DUTY - * `VOLUNTEER` - VOLUNTEER - * `BEREAVEMENT` - BEREAVEMENT - x-merge-category: hris - ReasonEnum: - enum: - - GENERAL_CUSTOMER_REQUEST - - GDPR - - OTHER - type: string - description: |- - * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST - * `GDPR` - GDPR - * `OTHER` - OTHER - x-merge-category: hris - RelationshipEnum: - enum: - - CHILD - - SPOUSE - - DOMESTIC_PARTNER - type: string - description: |- - * `CHILD` - CHILD - * `SPOUSE` - SPOUSE - * `DOMESTIC_PARTNER` - DOMESTIC_PARTNER - x-merge-category: hris - RemoteData: - type: object - description: |- - # The RemoteData Object - ### Description - The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. - - ### Usage Example - TODO - properties: - path: - type: string - description: The third-party API path that is being called. - example: /platform-endpoint - data: - readOnly: true - description: The data returned from the third-party for this object in its - original, unnormalized format. - example: - - Varies by platform - required: - - path - x-merge-category: hris - RemoteEndpointInfo: - type: object - properties: - method: - type: string - example: GET - url_path: - type: string - example: /example-url-path - field_traversal_path: - type: array - items: {} - example: - - example_key_name - required: - - field_traversal_path - - method - - url_path - x-merge-category: hris - RemoteFieldAPI: - type: object - properties: - schema: - type: object - additionalProperties: {} - example: - type: string - remote_key_name: - type: string - example: example_remote_key_name - remote_endpoint_info: - $ref: '#/components/schemas/RemoteEndpointInfo' - example: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - type: array - items: {} - nullable: true - example: - - example - advanced_metadata: - allOf: - - $ref: '#/components/schemas/AdvancedMetadata' - nullable: true - coverage: - oneOf: - - type: integer - - type: number - format: double - nullable: true - readOnly: true - example: 0.33 - required: - - advanced_metadata - - remote_endpoint_info - - remote_key_name - - schema - x-merge-category: hris - RemoteFieldAPIResponse: - type: object - properties: - Benefit: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - EmployerBenefit: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Company: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - EmployeePayrollRun: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Employee: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Employment: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Location: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - PayrollRun: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Team: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - TimeOff: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - TimeOffBalance: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - BankInfo: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - PayGroup: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Group: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Dependent: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - TimesheetEntry: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - x-merge-category: hris - RemoteKey: - type: object - description: |- - # The RemoteKey Object - ### Description - The `RemoteKey` object is used to represent a request for a new remote key. - - ### Usage Example - Post a `GenerateRemoteKey` to receive a new `RemoteKey`. - properties: - name: - type: string - example: Remote Deployment Key 1 - key: - type: string - example: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - required: - - key - - name - x-merge-category: hris - RemoteKeyForRegenerationRequest: - type: object - description: |- - # The RemoteKeyForRegeneration Object - ### Description - The `RemoteKeyForRegeneration` object is used to exchange an old remote key for a new one - - ### Usage Example - Post a `RemoteKeyForRegeneration` to swap out an old remote key for a new one - properties: - name: - type: string - minLength: 1 - description: The name of the remote key - example: Remote Deployment Key 1 - required: - - name - x-merge-category: hris - RemoteResponse: - type: object - description: |- - # The RemoteResponse Object - ### Description - The `RemoteResponse` object is used to represent information returned from a third-party endpoint. - - ### Usage Example - View the `RemoteResponse` returned from your `DataPassthrough`. - properties: - method: - type: string - example: GET - path: - type: string - example: /scooters - status: - type: integer - example: 200 - response: - example: - scooters: - - company: Lime - model: Gen 2.5 - - company: Bird - model: Bird Zero - response_headers: - type: object - additionalProperties: {} - example: - X-Page-Token: value - response_type: - oneOf: - - $ref: '#/components/schemas/ResponseTypeEnum' - - type: string - example: JSON - headers: - type: object - additionalProperties: {} - example: - EXTRA-HEADER: value - Authorization: - required: - - method - - path - - response - - status - x-merge-category: hris - RequestFormatEnum: - enum: - - JSON - - XML - - MULTIPART - type: string - description: |- - * `JSON` - JSON - * `XML` - XML - * `MULTIPART` - MULTIPART - x-merge-category: hris - RequestTypeEnum: - enum: - - VACATION - - SICK - - PERSONAL - - JURY_DUTY - - VOLUNTEER - - BEREAVEMENT - type: string - description: |- - * `VACATION` - VACATION - * `SICK` - SICK - * `PERSONAL` - PERSONAL - * `JURY_DUTY` - JURY_DUTY - * `VOLUNTEER` - VOLUNTEER - * `BEREAVEMENT` - BEREAVEMENT - x-merge-category: hris - ResponseTypeEnum: - enum: - - JSON - - BASE64_GZIP - type: string - description: |- - * `JSON` - JSON - * `BASE64_GZIP` - BASE64_GZIP - x-merge-category: hris - RoleEnum: - enum: - - ADMIN - - DEVELOPER - - MEMBER - - API - - SYSTEM - - MERGE_TEAM - type: string - description: |- - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - x-merge-category: hris - RunStateEnum: - enum: - - PAID - - DRAFT - - APPROVED - - FAILED - - CLOSED - type: string - description: |- - * `PAID` - PAID - * `DRAFT` - DRAFT - * `APPROVED` - APPROVED - * `FAILED` - FAILED - * `CLOSED` - CLOSED - x-merge-category: hris - RunTypeEnum: - enum: - - REGULAR - - OFF_CYCLE - - CORRECTION - - TERMINATION - - SIGN_ON_BONUS - type: string - description: |- - * `REGULAR` - REGULAR - * `OFF_CYCLE` - OFF_CYCLE - * `CORRECTION` - CORRECTION - * `TERMINATION` - TERMINATION - * `SIGN_ON_BONUS` - SIGN_ON_BONUS - x-merge-category: hris - SelectiveSyncConfigurationsUsageEnum: - enum: - - IN_NEXT_SYNC - - IN_LAST_SYNC - type: string - description: |- - * `IN_NEXT_SYNC` - IN_NEXT_SYNC - * `IN_LAST_SYNC` - IN_LAST_SYNC - x-merge-category: hris - StatusFd5Enum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - type: string - description: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - x-merge-category: hris - SyncStatus: - type: object - description: |- - # The SyncStatus Object - ### Description - The `SyncStatus` object is used to represent the syncing state of an account - - ### Usage Example - View the `SyncStatus` for an account to see how recently its models were synced. - properties: - model_name: - type: string - example: Employee - model_id: - type: string - example: hris.Employee - last_sync_start: - type: string - format: date-time - example: '2021-03-30T19:44:18.695973Z' - next_sync_start: - type: string - format: date-time - example: '2021-03-30T20:44:18.662942Z' - last_sync_result: - oneOf: - - $ref: '#/components/schemas/LastSyncResultEnum' - - type: string - example: DONE - last_sync_finished: - type: string - format: date-time - example: '2021-03-30T19:55:18.695973Z' - status: - oneOf: - - $ref: '#/components/schemas/StatusFd5Enum' - - type: string - example: SYNCING - is_initial_sync: - type: boolean - example: true - selective_sync_configurations_usage: - $ref: '#/components/schemas/SelectiveSyncConfigurationsUsageEnum' - required: - - is_initial_sync - - model_id - - model_name - - status - x-merge-sample-json: '{"model_name": "Candidate", "model_id": "ats.Candidate", - "last_sync_start": "2021-03-30T19:44:18.695973Z", "next_sync_start": "2021-03-30T20:44:18.662942Z", - "status": "SYNCING", "is_initial_sync": true}' - x-merge-category: hris - Tax: - type: object - description: |- - # The Tax Object - ### Description - The `Tax` object is used to represent an array of the tax deductions for a given employee's payroll run. - - ### Usage Example - Fetch from the `LIST Taxes` endpoint and filter by `ID` to show all taxes. - properties: - id: - type: string - format: uuid - readOnly: true - example: e3a825fd-c38d-4095-a717-df98c4cb9ebc - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '26806834' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - employee_payroll_run: - type: string - format: uuid - nullable: true - example: 35347df1-95e7-46e2-93cc-66f1191edca5 - name: - type: string - nullable: true - description: The tax's name. - example: California State Income Tax - amount: - type: number - format: double - nullable: true - description: The tax amount. - example: 100.25 - employer_tax: - type: boolean - nullable: true - description: Whether or not the employer is responsible for paying the tax. - example: 'False' - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - x-merge-nested-write-allowed: true - x-merge-category: hris - Team: - type: object - description: |- - # The Team Object - ### Description - The `Team` object is used to represent a subdivision of the company, usually a department. Each employee will be grouped into one specific Team. - - ### Usage Example - If you're building a way to filter by `Team`, you'd hit the `GET Teams` endpoint to fetch the `Teams`, and then use the `ID` of the team your user selects to filter the `GET Employees` endpoint. - properties: - id: - type: string - format: uuid - readOnly: true - example: 13a72919-9fae-4f54-81ca-ddfd8712a1ba - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The team's name. - example: Engineering - parent_team: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Team' - nullable: true - description: The team's parent team. - example: 1b998423-db0a-4037-a4cf-f79c60cb67b3 - x-merge-expands-to: Team - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /teams - data: - - Varies by platform - x-merge-expands: '{"parent_team": "Team"}' - x-merge-category: hris - TimeOff: - type: object - description: |- - # The TimeOff Object - ### Description - The `TimeOff` object is used to represent all employees' Time Off entries. - - ### Usage Example - Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all time off requests. - properties: - id: - type: string - format: uuid - readOnly: true - example: 91b2b905-e866-40c8-8be2-efe53827a0aa - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee requesting time off. - example: d2f972d0-2526-434b-9409-4c3b468e08f0 - x-merge-expands-to: Employee - approver: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The Merge ID of the employee with the ability to approve the - time off request. - example: 9efbc633-3387-4306-aa55-e2c635e6bb4f - x-merge-expands-to: Employee - status: - oneOf: - - $ref: '#/components/schemas/TimeOffStatusEnum' - - type: string - nullable: true - description: |- - The status of this time off request. - - * `REQUESTED` - REQUESTED - * `APPROVED` - APPROVED - * `DECLINED` - DECLINED - * `CANCELLED` - CANCELLED - * `DELETED` - DELETED - example: APPROVED - employee_note: - type: string - nullable: true - description: The employee note for this time off request. - example: Moving into the new apartment Kendall Roy gave me! - units: - oneOf: - - $ref: '#/components/schemas/UnitsEnum' - - type: string - nullable: true - description: |- - The measurement that the third-party integration uses to count time requested. - - * `HOURS` - HOURS - * `DAYS` - DAYS - example: DAYS - amount: - type: number - format: double - nullable: true - description: The time off quantity measured by the prescribed “units”. - example: 3 - request_type: - oneOf: - - $ref: '#/components/schemas/RequestTypeEnum' - - type: string - nullable: true - description: |- - The type of time off request. - - * `VACATION` - VACATION - * `SICK` - SICK - * `PERSONAL` - PERSONAL - * `JURY_DUTY` - JURY_DUTY - * `VOLUNTEER` - VOLUNTEER - * `BEREAVEMENT` - BEREAVEMENT - example: VACATION - start_time: - type: string - format: date-time - nullable: true - description: The day and time of the start of the time requested off. - example: '2020-11-10T00:00:00Z' - end_time: - type: string - format: date-time - nullable: true - description: The day and time of the end of the time requested off. - example: '2020-11-17T00:00:00Z' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /leave - data: - - Varies by platform - x-merge-expands: '{"approver": "Employee", "employee": "Employee"}' - x-merge-category: hris - TimeOffBalance: - type: object - description: |- - # The TimeOffBalance Object - ### Description - The `TimeOffBalance` object is used to represent current balances for an employee's Time Off plan. - - ### Usage Example - Fetch from the `LIST TimeOffBalances` endpoint and filter by `ID` to show all time off balances. - properties: - id: - type: string - format: uuid - readOnly: true - example: 91b2b905-e866-40c8-8be2-efe53827a0aa - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee the balance belongs to. - example: d2f972d0-2526-434b-9409-4c3b468e08f0 - x-merge-expands-to: Employee - balance: - type: number - format: double - nullable: true - description: The current remaining PTO balance, measured in hours. For integrations - that return this value in days, Merge multiplies by 8 to calculate hours. - example: '60.0' - used: - type: number - format: double - nullable: true - description: The amount of PTO used in terms of hours. For integrations - that return this value in days, Merge multiplies by 8 to calculate hours. - example: '45.0' - policy_type: - oneOf: - - $ref: '#/components/schemas/PolicyTypeEnum' - - type: string - nullable: true - description: |- - The policy type of this time off balance. - - * `VACATION` - VACATION - * `SICK` - SICK - * `PERSONAL` - PERSONAL - * `JURY_DUTY` - JURY_DUTY - * `VOLUNTEER` - VOLUNTEER - * `BEREAVEMENT` - BEREAVEMENT - example: VACATION - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /leave - data: - - Varies by platform - x-merge-expands: '{"employee": "Employee"}' - x-merge-category: hris - TimeOffEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/TimeOffRequest' - required: - - model - x-merge-category: hris - TimeOffRequest: - type: object - description: |- - # The TimeOff Object - ### Description - The `TimeOff` object is used to represent all employees' Time Off entries. - - ### Usage Example - Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all time off requests. - properties: - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee requesting time off. - example: d2f972d0-2526-434b-9409-4c3b468e08f0 - x-merge-expands-to: Employee - approver: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The Merge ID of the employee with the ability to approve the - time off request. - example: 9efbc633-3387-4306-aa55-e2c635e6bb4f - x-merge-expands-to: Employee - status: - oneOf: - - $ref: '#/components/schemas/TimeOffStatusEnum' - - type: string - nullable: true - description: |- - The status of this time off request. - - * `REQUESTED` - REQUESTED - * `APPROVED` - APPROVED - * `DECLINED` - DECLINED - * `CANCELLED` - CANCELLED - * `DELETED` - DELETED - example: APPROVED - employee_note: - type: string - nullable: true - description: The employee note for this time off request. - example: Moving into the new apartment Kendall Roy gave me! - units: - oneOf: - - $ref: '#/components/schemas/UnitsEnum' - - type: string - nullable: true - description: |- - The measurement that the third-party integration uses to count time requested. - - * `HOURS` - HOURS - * `DAYS` - DAYS - example: DAYS - amount: - type: number - format: double - nullable: true - description: The time off quantity measured by the prescribed “units”. - example: 3 - request_type: - oneOf: - - $ref: '#/components/schemas/RequestTypeEnum' - - type: string - nullable: true - description: |- - The type of time off request. - - * `VACATION` - VACATION - * `SICK` - SICK - * `PERSONAL` - PERSONAL - * `JURY_DUTY` - JURY_DUTY - * `VOLUNTEER` - VOLUNTEER - * `BEREAVEMENT` - BEREAVEMENT - example: VACATION - start_time: - type: string - format: date-time - nullable: true - description: The day and time of the start of the time requested off. - example: '2020-11-10T00:00:00Z' - end_time: - type: string - format: date-time - nullable: true - description: The day and time of the end of the time requested off. - example: '2020-11-17T00:00:00Z' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"approver": "Employee", "employee": "Employee"}' - x-merge-category: hris - TimeOffResponse: - type: object - properties: - model: - $ref: '#/components/schemas/TimeOff' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: hris - TimeOffStatusEnum: - enum: - - REQUESTED - - APPROVED - - DECLINED - - CANCELLED - - DELETED - type: string - description: |- - * `REQUESTED` - REQUESTED - * `APPROVED` - APPROVED - * `DECLINED` - DECLINED - * `CANCELLED` - CANCELLED - * `DELETED` - DELETED - x-merge-category: hris - TimesheetEntry: - type: object - description: |- - # The Timesheet Entry Object - ### Description - The `Timesheet Entry` object is used to track coverage for hours worked by an 'Employee'. - - - ### Usage Example - GET and POST Timesheet Entries - properties: - id: - type: string - format: uuid - readOnly: true - example: 91b2b905-e866-40c8-8be2-efe53827a0aa - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee the timesheet entry is for. - example: d2f972d0-2526-434b-9409-4c3b468e08f0 - x-merge-expands-to: Employee - hours_worked: - type: number - format: double - nullable: true - description: The number of hours logged by the employee. - example: 10 - start_time: - type: string - format: date-time - nullable: true - description: The time at which the employee started work. - example: '2020-11-10T00:00:00Z' - end_time: - type: string - format: date-time - nullable: true - description: The time at which the employee ended work. - example: '2020-11-10T00:10:00Z' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /dependent - data: - - Varies by platform - x-merge-expands: '{"employee": "Employee"}' - x-merge-category: hris - TimesheetEntryEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/TimesheetEntryRequest' - required: - - model - x-merge-category: hris - TimesheetEntryRequest: - type: object - description: |- - # The Timesheet Entry Object - ### Description - The `Timesheet Entry` object is used to track coverage for hours worked by an 'Employee'. - - - ### Usage Example - GET and POST Timesheet Entries - properties: - employee: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Employee' - nullable: true - description: The employee the timesheet entry is for. - example: d2f972d0-2526-434b-9409-4c3b468e08f0 - x-merge-expands-to: Employee - hours_worked: - type: number - format: double - nullable: true - description: The number of hours logged by the employee. - example: 10 - start_time: - type: string - format: date-time - nullable: true - description: The time at which the employee started work. - example: '2020-11-10T00:00:00Z' - end_time: - type: string - format: date-time - nullable: true - description: The time at which the employee ended work. - example: '2020-11-10T00:10:00Z' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"employee": "Employee"}' - x-merge-category: hris - TimesheetEntryResponse: - type: object - properties: - model: - $ref: '#/components/schemas/TimesheetEntry' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: hris - UnitsEnum: - enum: - - HOURS - - DAYS - type: string - description: |- - * `HOURS` - HOURS - * `DAYS` - DAYS - x-merge-category: hris - ValidationProblemSource: - type: object - properties: - pointer: - type: string - required: - - pointer - x-merge-category: hris - WarningValidationProblem: - type: object - properties: - source: - $ref: '#/components/schemas/ValidationProblemSource' - example: - pointer: /age - title: - type: string - example: Unrecognized Field - detail: - type: string - example: An unrecognized field, age, was passed in with request data. - problem_type: - type: string - example: UNRECOGNIZED_FIELD - required: - - detail - - problem_type - - title - x-merge-category: hris - WebhookReceiver: - type: object - properties: - event: - type: string - is_active: - type: boolean - key: - type: string - required: - - event - - is_active - x-merge-category: hris - WebhookReceiverRequest: - type: object - properties: - event: - type: string - minLength: 1 - is_active: - type: boolean - key: - type: string - minLength: 1 - required: - - event - - is_active - x-merge-category: hris - securitySchemes: - tokenAuth: - type: http - scheme: bearer - description: Token-based authentication with required prefix "Bearer" - x-fern-token-variable-name: api_key -servers: -- url: https://api.merge.dev/api/hris/v1 - description: Production - x-fern-server-name: Production -- url: https://api-sandbox.merge.dev/api/hris/v1 - description: Sandbox - x-fern-server-name: Sandbox -- url: https://api-eu.merge.dev/api/hris/v1 - description: Production EU - x-fern-server-name: ProductionEU -- url: https://api-ap.merge.dev/api/hris/v1 - description: Production APSE1 - x-fern-server-name: ProductionAPSE1 diff --git a/.mock/ticketing_v3.yml b/.mock/ticketing_v3.yml deleted file mode 100644 index a493d5ea1..000000000 --- a/.mock/ticketing_v3.yml +++ /dev/null @@ -1,8427 +0,0 @@ -openapi: 3.0.3 -info: - title: Merge Ticketing API - version: '1.0' - description: The unified API for building rich integrations with multiple Ticketing - platforms. - contact: - name: Merge Team - url: https://www.merge.dev/ - email: hello@merge.dev -paths: - /ticketing/v1/account-details: - get: - operationId: account_details_retrieve - description: Get details for a linked account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - account-details - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AccountDetails' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/account-token/{public_token}: - get: - operationId: account_token_retrieve - description: Returns the account token for the end user with the provided public - token. - parameters: - - in: path - name: public_token - schema: - type: string - required: true - tags: - - account-token - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AccountToken' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/accounts: - get: - operationId: accounts_list - description: Returns a list of `Account` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAccountList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/accounts/{id}: - get: - operationId: accounts_retrieve - description: Returns an `Account` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Account' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/async-passthrough: - post: - operationId: async_passthrough_create - description: Asynchronously pull data from an endpoint not currently supported - by Merge. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - async-passthrough - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AsyncPassthroughReciept' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/async-passthrough/{async_passthrough_receipt_id}: - get: - operationId: async_passthrough_retrieve - description: Retrieves data from earlier async-passthrough POST request - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: async_passthrough_receipt_id - schema: - type: string - format: uuid - required: true - tags: - - async-passthrough - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/RemoteResponse' - - type: string - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/attachments: - get: - operationId: attachments_list - description: Returns a list of `Attachment` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - ticket - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandTicket: - value: ticket - summary: Expand Ticket - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_created_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return attachments created in the third - party platform after this datetime. - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: ticket_id - schema: - type: string - description: If provided, will only return comments for this ticket. - examples: - TicketId: - summary: ticket_id - tags: - - attachments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAttachmentList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: attachments_create - description: Creates an `Attachment` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - attachments - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TicketingAttachmentEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/TicketingAttachmentEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/TicketingAttachmentEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/TicketingAttachmentResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/attachments/{id}: - get: - operationId: attachments_retrieve - description: Returns an `Attachment` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - ticket - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandTicket: - value: ticket - summary: Expand Ticket - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - attachments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Attachment' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/attachments/{id}/download: - get: - operationId: attachments_download_retrieve - description: Returns the `File` content with the given `id` as a stream of bytes. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: mime_type - schema: - type: string - description: If provided, specifies the export format of the file to be downloaded. - For information on supported export formats, please refer to our export format help center article. - tags: - - attachments - security: - - tokenAuth: [] - responses: - '200': - content: - application/octet-stream: - schema: - type: string - format: binary - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/attachments/meta/post: - get: - operationId: attachments_meta_post_retrieve - description: Returns metadata for `TicketingAttachment` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - attachments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/audit-trail: - get: - operationId: audit_trail_list - description: Gets a list of audit trail events. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_date - schema: - type: string - description: If included, will only include audit trail events that occurred - before this time - - in: query - name: event_type - schema: - type: string - description: 'If included, will only include events with the given event type. - Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, - `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, - `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, - `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, - `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, - `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, - `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, - `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, - `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, - `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`' - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: start_date - schema: - type: string - description: If included, will only include audit trail events that occurred - after this time - - in: query - name: user_email - schema: - type: string - description: If provided, this will return events associated with the specified - user email. Please note that the email address reflects the user's email - at the time of the event, and may not be their current email. - tags: - - audit-trail - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAuditLogEventList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/available-actions: - get: - operationId: available_actions_retrieve - description: Returns a list of models and actions available for an account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - available-actions - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AvailableActions' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/collections: - get: - operationId: collections_list - description: Returns a list of `Collection` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: collection_type - schema: - type: string - nullable: true - enum: - - '' - - LIST - - - - PROJECT - description: If provided, will only return collections of the given type. - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - parent_collection - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandParentCollection: - value: parent_collection - summary: Expand Parent_collection - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: name - schema: - type: string - nullable: true - description: If provided, will only return collections with this name. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: parent_collection_id - schema: - type: string - description: If provided, will only return collections whose parent collection - matches the given id. - examples: - ParentCollectionId: - summary: parent_collection_id - - in: query - name: remote_fields - schema: - type: string - enum: - - collection_type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesCollectionType: - value: collection_type - summary: Original Enum Values Collection_type - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - collection_type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesCollectionType: - value: collection_type - summary: Original Enum Values Collection_type - tags: - - collections - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedCollectionList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/collections/{collection_id}/viewers: - get: - operationId: collections_viewers_list - description: Returns a list of `Viewer` objects that point to a User id or Team - id that is either an assignee or viewer on a `Collection` with the given id. - [Learn - more.](https://help.merge.dev/en/articles/10333658-ticketing-access-control-list-acls) - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: collection_id - schema: - type: string - format: uuid - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - team - - user - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandUser,Team: - value: user,team - summary: Expand User, Team - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - collections - - viewers - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedViewerList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /ticketing/v1/collections/{id}: - get: - operationId: collections_retrieve - description: Returns a `Collection` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - parent_collection - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandParentCollection: - value: parent_collection - summary: Expand Parent_collection - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - collection_type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesCollectionType: - value: collection_type - summary: Original Enum Values Collection_type - - in: query - name: show_enum_origins - schema: - type: string - enum: - - collection_type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesCollectionType: - value: collection_type - summary: Original Enum Values Collection_type - tags: - - collections - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Collection' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/comments: - get: - operationId: comments_list - description: Returns a list of `Comment` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - contact - - ticket - - user - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandUser,Contact,Ticket: - value: user,contact,ticket - summary: Expand User, Contact, Ticket - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_created_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return Comments created in the third party - platform after this datetime. - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: ticket_id - schema: - type: string - description: If provided, will only return comments for this ticket. - examples: - TicketId: - summary: ticket_id - tags: - - comments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedCommentList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: comments_create - description: Creates a `Comment` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - comments - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CommentEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/CommentEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/CommentEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/CommentResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/comments/{id}: - get: - operationId: comments_retrieve - description: Returns a `Comment` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - contact - - ticket - - user - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandUser,Contact,Ticket: - value: user,contact,ticket - summary: Expand User, Contact, Ticket - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - comments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Comment' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/comments/meta/post: - get: - operationId: comments_meta_post_retrieve - description: Returns metadata for `Comment` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - comments - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/contacts: - get: - operationId: contacts_list - description: Returns a list of `Contact` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: email_address - schema: - type: string - nullable: true - description: If provided, will only return Contacts that match this email. - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandAccount: - value: account - summary: Expand Account - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - contacts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedContactList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: contacts_create - description: Creates a `Contact` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - contacts - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TicketingContactEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/TicketingContactEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/TicketingContactEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/TicketingContactResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/contacts/{id}: - get: - operationId: contacts_retrieve - description: Returns a `Contact` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandAccount: - value: account - summary: Expand Account - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - contacts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Contact' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/contacts/meta/post: - get: - operationId: contacts_meta_post_retrieve - description: Returns metadata for `TicketingContact` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - contacts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/default-scopes: - get: - operationId: default_scopes_retrieve - description: Get the default permissions for Merge Common Models and fields - across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - tags: - - scopes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/delete-account: - post: - operationId: delete_account_delete - description: Delete a linked account. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - delete-account - security: - - tokenAuth: [] - responses: - '200': - description: No response body - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/field-mappings: - get: - operationId: field_mappings_retrieve - description: Get all Field Mappings for this Linked Account. Field Mappings - are mappings between third-party Remote Fields and user defined Merge fields. - [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: exclude_remote_field_metadata - schema: - type: boolean - description: If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` - will be null). This will increase the speed of the request since these fields - require some calculations. - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingApiInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: field_mappings_create - description: Create new Field Mappings that will be available after the next - scheduled sync. This will cause the next sync for this Linked Account to sync - **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: exclude_remote_field_metadata - schema: - type: boolean - description: If `true`, remote fields metadata is excluded from each field - mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` - will be null). This will increase the speed of the request since these fields - require some calculations. - tags: - - field-mapping - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/CreateFieldMappingRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/field-mappings/{field_mapping_id}: - patch: - operationId: field_mappings_partial_update - description: Create or update existing Field Mappings for a Linked Account. - Changes will be reflected after the next scheduled sync. This will cause the - next sync for this Linked Account to sync **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: field_mapping_id - schema: - type: string - format: uuid - required: true - tags: - - field-mapping - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedEditFieldMappingRequest' - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - delete: - operationId: field_mappings_destroy - description: Deletes Field Mappings for a Linked Account. All data related to - this Field Mapping will be deleted and these changes will be reflected after - the next scheduled sync. This will cause the next sync for this Linked Account - to sync **ALL** data from start. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: field_mapping_id - schema: - type: string - format: uuid - required: true - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '204': - content: - application/json: - schema: - $ref: '#/components/schemas/FieldMappingInstanceResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/generate-key: - post: - operationId: generate_key_create - description: Create a remote key. - tags: - - generate-key - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/GenerateRemoteKeyRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKey' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/issues: - get: - operationId: issues_list - description: Gets all issues for Organization. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: account_token - schema: - type: string - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_date - schema: - type: string - description: If included, will only include issues whose most recent action - occurred before this time - - in: query - name: end_user_organization_name - schema: - type: string - - in: query - name: first_incident_time_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose first incident time - was after this datetime. - - in: query - name: first_incident_time_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose first incident time - was before this datetime. - - in: query - name: include_muted - schema: - type: string - description: If true, will include muted issues - - in: query - name: integration_name - schema: - type: string - - in: query - name: last_incident_time_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose last incident time - was after this datetime. - - in: query - name: last_incident_time_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return issues whose last incident time - was before this datetime. - - in: query - name: linked_account_id - schema: - type: string - description: If provided, will only include issues pertaining to the linked - account passed in. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: start_date - schema: - type: string - description: If included, will only include issues whose most recent action - occurred after this time - - in: query - name: status - schema: - type: string - enum: - - ONGOING - - RESOLVED - description: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - tags: - - issues - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedIssueList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/issues/{id}: - get: - operationId: issues_retrieve - description: Get a specific issue. - parameters: - - in: path - name: id - schema: - type: string - format: uuid - required: true - tags: - - issues - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Issue' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/link-token: - post: - operationId: link_token_create - description: Creates a link token to be used when linking a new end user. - tags: - - link-token - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/EndUserDetailsRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LinkToken' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/linked-account-scopes: - get: - operationId: linked_account_scopes_retrieve - description: Get all available permissions for Merge Common Models and fields - for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - scopes - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: linked_account_scopes_create - description: Update permissions for any Common Model or field for a single Linked - Account. Any Scopes not set in this POST request will inherit the default - Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - scopes - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CommonModelScopeAPI' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/linked-accounts: - get: - operationId: linked_accounts_list - description: List linked accounts for your organization. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: query - name: category - schema: - type: string - nullable: true - enum: - - accounting - - ats - - crm - - filestorage - - hris - - mktg - - ticketing - description: |- - Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` - - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: end_user_email_address - schema: - type: string - description: If provided, will only return linked accounts associated with - the given email address. - - in: query - name: end_user_organization_name - schema: - type: string - description: If provided, will only return linked accounts associated with - the given organization name. - - in: query - name: end_user_origin_id - schema: - type: string - description: If provided, will only return linked accounts associated with - the given origin ID. - - in: query - name: end_user_origin_ids - schema: - type: string - description: Comma-separated list of EndUser origin IDs, making it possible - to specify multiple EndUsers at once. - - in: query - name: id - schema: - type: string - format: uuid - - in: query - name: ids - schema: - type: string - description: Comma-separated list of LinkedAccount IDs, making it possible - to specify multiple LinkedAccounts at once. - - in: query - name: include_duplicates - schema: - type: boolean - description: If `true`, will include complete production duplicates of the - account specified by the `id` query parameter in the response. `id` must - be for a complete production linked account. - - in: query - name: integration_name - schema: - type: string - description: If provided, will only return linked accounts associated with - the given integration name. - - in: query - name: is_test_account - schema: - type: string - description: If included, will only include test linked accounts. If not included, - will only include non-test linked accounts. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: status - schema: - type: string - description: 'Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, - `RELINK_NEEDED`' - tags: - - linked-accounts - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAccountDetailsAndActionsList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/passthrough: - post: - operationId: passthrough_create - description: Pull data from an endpoint not currently supported by Merge. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - passthrough - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/DataPassthroughRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/projects: - get: - operationId: projects_list - description: Returns a list of `Project` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - projects - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedProjectList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/projects/{id}: - get: - operationId: projects_retrieve - description: Returns a `Project` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - projects - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Project' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/projects/{parent_id}/users: - get: - operationId: projects_users_list - description: Returns a list of `User` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - roles - - teams - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandTeams,Roles: - value: teams,roles - summary: Expand Teams, Roles - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: path - name: parent_id - schema: - type: string - format: uuid - required: true - tags: - - projects - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedUserList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/regenerate-key: - post: - operationId: regenerate_key_create - description: Exchange remote keys. - tags: - - regenerate-key - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteKey' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/remote-fields: - get: - operationId: remote_fields_retrieve - description: Get all remote fields for a Linked Account. Remote fields are third-party - fields that are accessible after initial sync if remote_data is enabled. You - can use remote fields to override existing Merge fields or map a new Merge - field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: common_models - schema: - type: string - description: A comma seperated list of Common Model names. If included, will - only return Remote Fields for those Common Models. - - in: query - name: include_example_values - schema: - type: string - description: If true, will include example values, where available, for remote - fields in the 3rd party platform. These examples come from active data from - your customers. - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RemoteFieldAPIResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/roles: - get: - operationId: roles_list - description: Returns a list of `Role` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - roles - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRoleList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/roles/{id}: - get: - operationId: roles_retrieve - description: Returns a `Role` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - roles - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Role' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/sync-status: - get: - operationId: sync_status_list - description: Get sync status for the current sync and the most recently finished - sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` - represents the most recent time any sync completed. These timestamps may correspond - to different sync instances which may result in a sync start time being later - than a separate sync completed time. To ensure you are retrieving the latest - available data reference the `last_sync_finished` timestamp where `last_sync_result` - is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, - `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about - sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - sync-status - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedSyncStatusList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/sync-status/resync: - post: - operationId: sync_status_resync_create - description: Force re-sync of all models. This endpoint is available for monthly, - quarterly, and highest sync frequency customers on the Professional or Enterprise - plans. Doing so will consume a sync credit for the relevant linked account. - Force re-syncs can also be triggered manually in the Merge Dashboard and is - available for all customers. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - force-resync - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SyncStatus' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/tags: - get: - operationId: tags_list - description: Returns a list of `Tag` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - tags - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedTagList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/tags/{id}: - get: - operationId: tags_retrieve - description: Returns a `Tag` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - tags - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Tag' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/target-fields: - get: - operationId: target_fields_retrieve - description: Get all organization-wide Target Fields, this will not include - any Linked Account specific Target Fields. Organization-wide Target Fields - are additional fields appended to the Merge Common Model for all Linked Accounts - in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - field-mapping - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ExternalTargetFieldAPIResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/teams: - get: - operationId: teams_list - description: Returns a list of `Team` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - tags: - - teams - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedTeamList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/teams/{id}: - get: - operationId: teams_retrieve - description: Returns a `Team` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - teams - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Team' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/tickets: - get: - operationId: tickets_list - description: Returns a list of `Ticket` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: account_id - schema: - type: string - description: If provided, will only return tickets for this account. - examples: - AccountId: - summary: account_id - - in: query - name: assignee_ids - schema: - type: string - description: If provided, will only return tickets assigned to the assignee_ids; - multiple assignee_ids can be separated by commas. - - in: query - name: collection_ids - schema: - type: string - description: If provided, will only return tickets assigned to the collection_ids; - multiple collection_ids can be separated by commas. - - in: query - name: completed_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return tickets completed after this datetime. - - in: query - name: completed_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return tickets completed before this datetime. - - in: query - name: contact_id - schema: - type: string - description: If provided, will only return tickets for this contact. - examples: - ContactId: - summary: contact_id - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: creator_id - schema: - type: string - description: If provided, will only return tickets created by this creator_id. - examples: - CreatorId: - summary: creator_id - - in: query - name: creator_ids - schema: - type: string - description: If provided, will only return tickets created by the creator_ids; - multiple creator_ids can be separated by commas. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: due_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return tickets due after this datetime. - - in: query - name: due_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return tickets due before this datetime. - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - assigned_teams - - assignees - - attachments - - collections - - contact - - creator - - parent_ticket - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandAttachments,Assignees,Collections,AssignedTeams,Account,Contact,Creator,ParentTicket: - value: - attachments,assignees,collections,assigned_teams,account,contact,creator,parent_ticket - summary: Expand Attachments, Assignees, Collections, Assigned_teams, Account, - Contact, Creator, Parent_ticket - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - in: query - name: name - schema: - type: string - nullable: true - description: If provided, will only return tickets with this name. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: parent_ticket_id - schema: - type: string - description: If provided, will only return sub tickets of the parent_ticket_id. - examples: - ParentTicketId: - summary: parent_ticket_id - - in: query - name: priority - schema: - type: string - nullable: true - enum: - - HIGH - - LOW - - NORMAL - - URGENT - description: |- - If provided, will only return tickets of this priority. - - * `URGENT` - URGENT - * `HIGH` - HIGH - * `NORMAL` - NORMAL - * `LOW` - LOW - - in: query - name: remote_created_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return tickets created in the third party - platform after this datetime. - - in: query - name: remote_created_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return tickets created in the third party - platform before this datetime. - - in: query - name: remote_fields - schema: - type: string - enum: - - priority - - priority,status - - priority,status,ticket_type - - priority,ticket_type - - status - - status,ticket_type - - ticket_type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesPriority,Status,TicketType: - value: priority,status,ticket_type - summary: Original Enum Values Priority, Status, Ticket_type - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: remote_updated_after - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return tickets updated in the third party - platform after this datetime. - - in: query - name: remote_updated_before - schema: - type: string - format: date-time - nullable: true - description: If provided, will only return tickets updated in the third party - platform before this datetime. - - in: query - name: show_enum_origins - schema: - type: string - enum: - - priority - - priority,status - - priority,status,ticket_type - - priority,ticket_type - - status - - status,ticket_type - - ticket_type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesPriority,Status,TicketType: - value: priority,status,ticket_type - summary: Original Enum Values Priority, Status, Ticket_type - - in: query - name: status - schema: - type: string - nullable: true - enum: - - '' - - CLOSED - - IN_PROGRESS - - - - ON_HOLD - - OPEN - description: If provided, will only return tickets of this status. - - in: query - name: tags - schema: - type: string - description: If provided, will only return tickets matching the tags; multiple - tags can be separated by commas. - - in: query - name: ticket_type - schema: - type: string - nullable: true - description: If provided, will only return tickets of this type. - - in: query - name: ticket_url - schema: - type: string - format: uri - nullable: true - description: If provided, will only return tickets where the URL matches or - contains the substring - tags: - - tickets - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedTicketList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: tickets_create - description: Creates a `Ticket` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - tickets - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TicketEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/TicketEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/TicketEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/TicketResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/tickets/{id}: - get: - operationId: tickets_retrieve - description: Returns a `Ticket` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - account - - assigned_teams - - assignees - - attachments - - collections - - contact - - creator - - parent_ticket - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandAttachments,Assignees,Collections,AssignedTeams,Account,Contact,Creator,ParentTicket: - value: - attachments,assignees,collections,assigned_teams,account,contact,creator,parent_ticket - summary: Expand Attachments, Assignees, Collections, Assigned_teams, Account, - Contact, Creator, Parent_ticket - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_remote_fields - schema: - type: boolean - description: Whether to include all remote fields, including fields that Merge - did not map to common models, in a normalized format. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: remote_fields - schema: - type: string - enum: - - priority - - priority,status - - priority,status,ticket_type - - priority,ticket_type - - status - - status,ticket_type - - ticket_type - description: Deprecated. Use show_enum_origins. - examples: - OriginalEnumValuesPriority,Status,TicketType: - value: priority,status,ticket_type - summary: Original Enum Values Priority, Status, Ticket_type - - in: query - name: show_enum_origins - schema: - type: string - enum: - - priority - - priority,status - - priority,status,ticket_type - - priority,ticket_type - - status - - status,ticket_type - - ticket_type - description: A comma separated list of enum field names for which you'd like - the original values to be returned, instead of Merge's normalized enum values. - [Learn - more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - examples: - OriginalEnumValuesPriority,Status,TicketType: - value: priority,status,ticket_type - summary: Original Enum Values Priority, Status, Ticket_type - tags: - - tickets - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Ticket' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - patch: - operationId: tickets_partial_update - description: Updates a `Ticket` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: is_debug_mode - schema: - type: boolean - description: Whether to include debug fields (such as log file links) in the - response. - - in: query - name: run_async - schema: - type: boolean - description: Whether or not third-party updates should be run asynchronously. - tags: - - tickets - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedTicketEndpointRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedTicketEndpointRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedTicketEndpointRequest' - required: true - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/TicketResponse' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/tickets/{ticket_id}/viewers: - get: - operationId: tickets_viewers_list - description: Returns a list of `Viewer` objects that point to a User id or Team - id that is either an assignee or viewer on a `Ticket` with the given id. [Learn - more.](https://help.merge.dev/en/articles/10333658-ticketing-access-control-list-acls) - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - team - - user - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandUser,Team: - value: user,team - summary: Expand User, Team - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: path - name: ticket_id - schema: - type: string - format: uuid - required: true - tags: - - tickets - - viewers - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedViewerList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /ticketing/v1/tickets/meta/patch/{id}: - get: - operationId: tickets_meta_patch_retrieve - description: Returns metadata for `Ticket` PATCHs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: path - name: id - schema: - type: string - format: uuid - required: true - tags: - - tickets - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-patch: META_PATCH - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/tickets/meta/post: - get: - operationId: tickets_meta_post_retrieve - description: Returns metadata for `Ticket` POSTs. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: collection_id - schema: - type: string - description: If provided, will only return tickets for this collection. - - in: query - name: ticket_type - schema: - type: string - description: If provided, will only return tickets for this ticket type. - tags: - - tickets - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetaResponse' - description: '' - x-merge-meta-post: META_POST - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/tickets/remote-field-classes: - get: - operationId: tickets_remote_field_classes_list - description: Returns a list of `RemoteFieldClass` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: ids - schema: - type: string - description: If provided, will only return remote field classes with the `ids` - in this list - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: is_common_model_field - schema: - type: boolean - nullable: true - description: If provided, will only return remote field classes with this - is_common_model_field value - - in: query - name: is_custom - schema: - type: boolean - nullable: true - description: If provided, will only return remote fields classes with this - is_custom value - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - tickets - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedRemoteFieldClassList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA - /ticketing/v1/users: - get: - operationId: users_list - description: Returns a list of `User` objects. - x-fern-pagination: - cursor: $request.cursor - next_cursor: $response.next - results: $response.results - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: created_after - schema: - type: string - format: date-time - description: If provided, will only return objects created after this datetime. - - in: query - name: created_before - schema: - type: string - format: date-time - description: If provided, will only return objects created before this datetime. - - in: query - name: cursor - schema: - type: string - description: The pagination cursor value. - examples: - CursorExample: - value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - summary: Cursor Example - - in: query - name: email_address - schema: - type: string - nullable: true - description: If provided, will only return users with emails equal to this - value (case insensitive). - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - roles - - teams - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandTeams,Roles: - value: teams,roles - summary: Expand Teams, Roles - explode: false - - in: query - name: include_deleted_data - schema: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - - in: query - name: modified_after - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge after this date time - will be returned. - - in: query - name: modified_before - schema: - type: string - format: date-time - description: If provided, only objects synced by Merge before this date time - will be returned. - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: remote_id - schema: - type: string - nullable: true - description: The API provider's ID for the given object. - - in: query - name: team - schema: - type: string - description: If provided, will only return users matching in this team. - tags: - - users - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedUserList' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/users/{id}: - get: - operationId: users_retrieve - description: Returns a `User` object with the given `id`. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - - in: query - name: expand - schema: - type: array - items: - type: string - enum: - - roles - - teams - description: Which relations should be returned in expanded form. Multiple - relation names should be comma separated without spaces. - examples: - ExpandTeams,Roles: - value: teams,roles - summary: Expand Teams, Roles - explode: false - - in: path - name: id - schema: - type: string - format: uuid - required: true - - in: query - name: include_remote_data - schema: - type: boolean - description: Whether to include the original data Merge fetched from the third-party - to produce these models. - - in: query - name: include_shell_data - schema: - type: boolean - description: Whether to include shell records. Shell records are empty records - (they may contain some metadata but all other fields are null). - tags: - - users - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - /ticketing/v1/webhook-receivers: - get: - operationId: webhook_receivers_list - description: Returns a list of `WebhookReceiver` objects. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - webhook-receivers - security: - - tokenAuth: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/WebhookReceiver' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC - post: - operationId: webhook_receivers_create - description: Creates a `WebhookReceiver` object with the given values. - parameters: - - in: header - name: X-Account-Token - schema: - type: string - description: Token identifying the end user. - required: true - tags: - - webhook-receivers - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/WebhookReceiverRequest' - required: true - security: - - tokenAuth: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookReceiver' - description: '' - x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC -components: - schemas: - Account: - type: object - description: |- - # The Account Object - ### Description - The `Account` object is used to represent the account that a ticket is associated with. - - The account is a company that may be a customer. This does not represent the company that is receiving the ticket. - - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The account's name. - example: Waystar Royco - domains: - type: array - items: - type: string - nullable: true - nullable: true - description: The account's domain names. - example: - - waystar-royco.com - - royco.com - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - example: - - path: /actions - data: - - Varies by platform - x-merge-expands: '{"owner": "User"}' - x-merge-category: ticketing - AccountDetails: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - integration: - type: string - readOnly: true - example: BambooHR - integration_slug: - type: string - readOnly: true - example: bamboohr - category: - oneOf: - - $ref: '#/components/schemas/CategoryEnum' - - type: string - nullable: true - example: hris - end_user_origin_id: - type: string - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - end_user_organization_name: - type: string - readOnly: true - example: Waystar Royco - end_user_email_address: - type: string - format: email - readOnly: true - example: kendall.roy@waystar-royco.com - status: - type: string - readOnly: true - example: COMPLETE - webhook_listener_url: - type: string - format: uri - readOnly: true - example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: - type: boolean - nullable: true - readOnly: true - description: Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test Linked - Accounts, incomplete Production Linked Accounts, and ignored duplicate - Production Linked Account sets. - example: true - account_type: - type: string - readOnly: true - example: PRODUCTION - completed_at: - type: string - format: date-time - nullable: true - description: The time at which account completes the linking flow. - example: '2024-08-26T20:11:19.277118Z' - x-merge-category: ticketing - AccountDetailsAndActions: - type: object - description: |- - # The LinkedAccount Object - ### Description - The `LinkedAccount` object is used to represent an end user's link with a specific integration. - - ### Usage Example - View a list of your organization's `LinkedAccount` objects. - properties: - id: - type: string - example: e59b1821-f85c-4e28-a6b3-1804156f3563 - category: - oneOf: - - $ref: '#/components/schemas/CategoryEnum' - - type: string - example: hris - status: - oneOf: - - $ref: '#/components/schemas/AccountDetailsAndActionsStatusEnum' - - type: string - example: INCOMPLETE - status_detail: - type: string - example: Invalid login credentials - end_user_origin_id: - type: string - example: 3ac95cde-6c7f-4eef-afec-be710b42308d - end_user_organization_name: - type: string - example: Foo Bar, LLC - end_user_email_address: - type: string - example: hradmin@foobar.dev - subdomain: - type: string - description: The tenant or domain the customer has provided access to. - example: foobar - webhook_listener_url: - type: string - example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 - is_duplicate: - type: boolean - nullable: true - description: Whether a Production Linked Account's credentials match another - existing Production Linked Account. This field is `null` for Test Linked - Accounts, incomplete Production Linked Accounts, and ignored duplicate - Production Linked Account sets. - example: true - integration: - $ref: '#/components/schemas/AccountDetailsAndActionsIntegration' - example: - name: SAP SuccessFactors - categories: - - hris - - ats - image: https://cdn.merge.dev/SuccessFactors_Logo.png - square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg - color: '#F6A704' - slug: sap-successfactors - passthrough_available: true - available_model_operations: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - account_type: - type: string - example: PRODUCTION - completed_at: - type: string - format: date-time - example: '2024-08-26T20:11:19.277118Z' - required: - - account_type - - completed_at - - end_user_email_address - - end_user_organization_name - - id - - status - - webhook_listener_url - x-merge-sample-json: '{"id": "e59b1821-f85c-4e28-a6b3-1804156f3563", "category": - "hris", "status": "INCOMPLETE", "status_detail": "Invalid login credentials", - "end_user_origin_id": "3ac95cde-6c7f-4eef-afec-be710b42308d", "end_user_organization_name": - "Foo Bar, LLC", "end_user_email_address": "hradmin@foobar.dev", "webhook_listener_url": - "https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4", - "is_duplicate": true, "integration": {"name": "SAP SuccessFactors", "categories": - ["hris", "ats"], "image": "https://cdn.merge.dev/SuccessFactors_Logo.png", - "square_image": "https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg", "color": - "#F6A704", "slug": "sap-successfactors", "passthrough_available": true, "available_model_operations": - [{"model_name": "Candidate", "available_operations": ["FETCH", "CREATE"], - "required_post_parameters": ["remote_user_id"], "supported_fields": ["first_name", - "last_name", "company", "title"]}]}}' - x-merge-category: ticketing - AccountDetailsAndActionsIntegration: - type: object - properties: - name: - type: string - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - image: - type: string - square_image: - type: string - color: - type: string - slug: - type: string - passthrough_available: - type: boolean - available_model_operations: - type: array - items: - $ref: '#/components/schemas/ModelOperation' - required: - - categories - - color - - name - - passthrough_available - - slug - x-merge-category: ticketing - AccountDetailsAndActionsStatusEnum: - enum: - - COMPLETE - - INCOMPLETE - - RELINK_NEEDED - - IDLE - type: string - description: |- - * `COMPLETE` - COMPLETE - * `INCOMPLETE` - INCOMPLETE - * `RELINK_NEEDED` - RELINK_NEEDED - * `IDLE` - IDLE - x-merge-category: ticketing - AccountIntegration: - type: object - properties: - name: - type: string - description: Company name. - abbreviated_name: - type: string - nullable: true - description: "Optional. This shortened name appears in places with limited - space, usually in conjunction with the platform's logo (e.g., Merge Link - menu).

Example: Workforce Now (in lieu of ADP Workforce Now), - SuccessFactors (in lieu of SAP SuccessFactors)" - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - description: Category or categories this integration belongs to. Multiple - categories should be comma separated, i.e. [ats, hris]. - readOnly: true - image: - type: string - format: uri - nullable: true - description: Company logo in rectangular shape. - square_image: - type: string - format: uri - nullable: true - description: Company logo in square shape. - color: - type: string - description: The color of this integration used for buttons and text throughout - the app and landing pages. Choose a darker, saturated color. - pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ - maxLength: 18 - slug: - type: string - readOnly: true - api_endpoints_to_documentation_urls: - type: object - additionalProperties: {} - description: "Mapping of API endpoints to documentation urls for support. - Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', - 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], - 'POST': []}" - webhook_setup_guide_url: - type: string - nullable: true - description: Setup guide URL for third party webhook creation. Exposed in - Merge Docs. - category_beta_status: - type: object - description: Category or categories this integration is in beta status for. - readOnly: true - required: - - name - x-merge-category: ticketing - AccountToken: - type: object - properties: - account_token: - type: string - example: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB - integration: - $ref: '#/components/schemas/AccountIntegration' - example: - name: SAP SuccessFactors - categories: - - hris - - ats - image: https://cdn.merge.dev/SuccessFactors_Logo.png - square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg - color: '#F6A704' - slug: sap-successfactors - id: - type: string - example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd - required: - - account_token - - id - - integration - x-merge-category: ticketing - AdvancedMetadata: - type: object - properties: - id: - type: string - format: uuid - display_name: - type: string - description: - type: string - is_required: - type: boolean - is_custom: - type: boolean - field_choices: - type: array - items: {} - required: - - id - x-merge-category: ticketing - AsyncPassthroughReciept: - type: object - properties: - async_passthrough_receipt_id: - type: string - format: uuid - example: fd29020f-2695-445e-922e-dcd5e81903fd - required: - - async_passthrough_receipt_id - x-merge-category: ticketing - Attachment: - type: object - description: |- - # The Attachment Object - ### Description - The `Attachment` object is used to represent an attachment for a ticket. - - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - file_name: - type: string - nullable: true - description: The attachment's name. It is required to include the file extension - in the attachment's name. - example: Screenshot.png - ticket: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Ticket' - nullable: true - description: The ticket associated with the attachment. - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - x-merge-expands-to: Ticket - file_url: - type: string - nullable: true - example: http://alturl.com/p749b - description: The attachment's url. It is required to include the file extension - in the file's URL. - content_type: - type: string - nullable: true - description: The attachment's file format. - example: jpeg - uploaded_by: - type: string - format: uuid - nullable: true - description: The user who uploaded the attachment. - example: 28b54125-287f-494d-965e-3c5b330c9a68 - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's attachment was created. - example: '2022-11-10T00:00:00Z' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - x-merge-nested-write-allowed: true - x-merge-expands: '{"ticket": "Ticket"}' - x-merge-category: ticketing - AttachmentRequest: - type: object - description: |- - # The Attachment Object - ### Description - The `Attachment` object is used to represent an attachment for a ticket. - - ### Usage Example - TODO - properties: - file_name: - type: string - nullable: true - description: The attachment's name. It is required to include the file extension - in the attachment's name. - example: Screenshot.png - ticket: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Ticket' - nullable: true - description: The ticket associated with the attachment. - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - x-merge-expands-to: Ticket - file_url: - type: string - nullable: true - example: http://alturl.com/p749b - description: The attachment's url. It is required to include the file extension - in the file's URL. - content_type: - type: string - nullable: true - description: The attachment's file format. - example: jpeg - uploaded_by: - type: string - format: uuid - nullable: true - description: The user who uploaded the attachment. - example: 28b54125-287f-494d-965e-3c5b330c9a68 - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"ticket": "Ticket"}' - x-merge-category: ticketing - AuditLogEvent: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: b5ceea2a-7171-47ce-8090-165cfce5572c - user_name: - type: string - nullable: true - description: The User's full name at the time of this Event occurring. - maxLength: 200 - example: Gil Feig - user_email: - type: string - format: email - nullable: true - description: The User's email at the time of this Event occurring. - maxLength: 254 - example: hello@merge.dev - role: - oneOf: - - $ref: '#/components/schemas/RoleEnum' - - type: string - description: |- - Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. - - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - example: ADMIN - ip_address: - type: string - maxLength: 45 - example: 192.0.2.123 - event_type: - oneOf: - - $ref: '#/components/schemas/EventTypeEnum' - - type: string - description: |- - Designates the type of event that occurred. - - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - * `INVITED_USER` - INVITED_USER - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - * `CREATED_DESTINATION` - CREATED_DESTINATION - * `DELETED_DESTINATION` - DELETED_DESTINATION - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - * `CHANGED_SCOPES` - CHANGED_SCOPES - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - * `RESET_PASSWORD` - RESET_PASSWORD - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - * `MUTED_ISSUE` - MUTED_ISSUE - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - example: CHANGED_SCOPES - event_description: - type: string - example: Organization-wide Scopes for model hris.Employee updated from Read - to Read+Write - created_at: - type: string - format: date-time - readOnly: true - required: - - event_description - - event_type - - ip_address - - role - x-merge-category: ticketing - AvailableActions: - type: object - description: |- - # The AvailableActions Object - ### Description - The `Activity` object is used to see all available model/operation combinations for an integration. - - ### Usage Example - Fetch all the actions available for the `Zenefits` integration. - properties: - integration: - $ref: '#/components/schemas/AccountIntegration' - example: - name: Lever - categories: - - ats - image: https://merge-api-production.s3.amazonaws.com/media/Lever_Logo.png - square_image: https://merge-api-production.s3.amazonaws.com/media/Lever_Square_Logo.png - color: '#262A34' - is_in_beta: 'true' - api_endpoints_to_documentation_urls: "{'GET': [('/common-model-scopes', - 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve')], - 'POST': []}" - passthrough_available: - type: boolean - example: true - available_model_operations: - type: array - items: - $ref: '#/components/schemas/ModelOperation' - example: - - model_name: Candidate - available_operations: - - FETCH - - CREATE - required_post_parameters: - - remote_user_id - supported_fields: - - first_name - - last_name - - company - - title - required: - - integration - - passthrough_available - x-merge-category: ticketing - CategoriesEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - type: string - description: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - x-merge-category: ticketing - CategoryEnum: - enum: - - hris - - ats - - accounting - - ticketing - - crm - - mktg - - filestorage - type: string - description: |- - * `hris` - hris - * `ats` - ats - * `accounting` - accounting - * `ticketing` - ticketing - * `crm` - crm - * `mktg` - mktg - * `filestorage` - filestorage - x-merge-category: ticketing - Collection: - type: object - description: |- - # The Collection Object - ### Description - The `Collection` object is used to represent one or more `Tickets`. There can be a hierarchy of `Collections`, in which a sub-collection belongs to a parent-collection. - - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: fb8c55b6-1cb8-4b4c-9fb6-17924231619d - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The collection's name. - example: Q1 Platform - description: - type: string - nullable: true - description: The collection's description. - example: For tracking all tasks related to Platform for Q1 - access_level: - oneOf: - - $ref: '#/components/schemas/CollectionAccessLevelEnum' - - type: string - nullable: true - description: |- - The level of access a User has to the Collection and its sub-objects. - - * `PRIVATE` - PRIVATE - * `COMPANY` - COMPANY - * `PUBLIC` - PUBLIC - * `PARENT_COLLECTION` - PARENT_COLLECTION - example: PUBLIC - collection_type: - oneOf: - - $ref: '#/components/schemas/CollectionTypeEnum' - - type: string - nullable: true - description: |- - The collection's type. - - * `LIST` - LIST - * `PROJECT` - PROJECT - example: LIST - $ref: '#/components/schemas/CollectionTypeEnum' - parent_collection: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Collection' - nullable: true - description: The parent collection for this collection. - example: 25782302-5be1-4d78-8f46-2a5db72204ef - x-merge-expands-to: Collection - collection_url: - type: string - format: uri - nullable: true - description: The 3rd party url of the Collection. - maxLength: 2000 - example: https://example.com - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's collection was created. - example: '2022-01-01T00:00:00Z' - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's collection was updated. - example: '2022-01-01T00:00:00Z' - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - x-merge-expands: '{"parent_collection": "Collection"}' - x-merge-category: ticketing - CollectionAccessLevelEnum: - enum: - - PRIVATE - - COMPANY - - PUBLIC - - PARENT_COLLECTION - type: string - description: |- - * `PRIVATE` - PRIVATE - * `COMPANY` - COMPANY - * `PUBLIC` - PUBLIC - * `PARENT_COLLECTION` - PARENT_COLLECTION - x-merge-category: ticketing - CollectionTypeEnum: - enum: - - LIST - - PROJECT - type: string - description: |- - * `LIST` - LIST - * `PROJECT` - PROJECT - x-merge-category: ticketing - Comment: - type: object - description: |- - # The Comment Object - ### Description - The `Comment` object is used to represent a comment on a ticket. - - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - user: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The author of the Comment, if the author is a User. If the - third party does not support specifying an author, we will append "[Posted - on behalf of {name}]" to the comment. - example: 17a54124-287f-494d-965e-3c5b330c9a68 - x-merge-expands-to: User - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The author of the Comment, if the author is a Contact.If the - third party does not support specifying an author, we will append "[Posted - on behalf of {name}]" to the comment. - example: dde3fb16-b8eb-483d-81c4-b78100816f15 - x-merge-expands-to: Contact - body: - type: string - nullable: true - description: The comment's text body. - example: When will these integrations be done? You all should use Merge. - html_body: - type: string - nullable: true - description: The comment's text body formatted as html. - example: When will these integrations be done? You all should use Merge. - ticket: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Ticket' - nullable: true - description: 'The ticket associated with the comment. ' - example: fb8c55b6-1cb8-4b4c-9fb6-17924231619d - x-merge-expands-to: Ticket - is_private: - type: boolean - nullable: true - description: Whether or not the comment is internal. - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's comment was created. - example: '1990-11-10T00:00:00Z' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - x-merge-expands: '{"contact": "Contact", "ticket": "Ticket", "user": "User"}' - x-merge-category: ticketing - CommentEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/CommentRequest' - required: - - model - x-merge-category: ticketing - CommentRequest: - type: object - description: |- - # The Comment Object - ### Description - The `Comment` object is used to represent a comment on a ticket. - - ### Usage Example - TODO - properties: - user: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The author of the Comment, if the author is a User. If the - third party does not support specifying an author, we will append "[Posted - on behalf of {name}]" to the comment. - example: 17a54124-287f-494d-965e-3c5b330c9a68 - x-merge-expands-to: User - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The author of the Comment, if the author is a Contact.If the - third party does not support specifying an author, we will append "[Posted - on behalf of {name}]" to the comment. - example: dde3fb16-b8eb-483d-81c4-b78100816f15 - x-merge-expands-to: Contact - body: - type: string - nullable: true - description: The comment's text body. - example: When will these integrations be done? You all should use Merge. - html_body: - type: string - nullable: true - description: The comment's text body formatted as html. - example: When will these integrations be done? You all should use Merge. - ticket: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Ticket' - nullable: true - description: 'The ticket associated with the comment. ' - example: fb8c55b6-1cb8-4b4c-9fb6-17924231619d - x-merge-expands-to: Ticket - is_private: - type: boolean - nullable: true - description: Whether or not the comment is internal. - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"contact": "Contact", "ticket": "Ticket", "user": "User"}' - x-merge-category: ticketing - CommentResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Comment' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: ticketing - CommonModelScopeAPI: - type: object - properties: - common_models: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializer' - description: The common models you want to update the scopes for - example: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - created_at - - custom_fields - - date_of_birth - - first_name - - gender - - remote_created_at - - remote_data - disabled_fields: - - company - - employments - - groups - - home_location - - manager - - work_location - required: - - common_models - x-merge-category: ticketing - CommonModelScopesBodyRequest: - type: object - properties: - model_id: - type: string - minLength: 1 - example: hris.Employee - enabled_actions: - type: array - items: - $ref: '#/components/schemas/EnabledActionsEnum' - example: - - READ - - WRITE - disabled_fields: - type: array - items: - type: string - minLength: 1 - example: - - first_name - required: - - disabled_fields - - enabled_actions - - model_id - x-merge-category: ticketing - Contact: - type: object - description: |- - # The Contact Object - ### Description - The `Contact` object is used to represent the customer, lead, or external user that a ticket is associated with. - - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The contact's name. - example: Cousin Greg - email_address: - type: string - nullable: true - description: The contact's email address. - example: greg@waystar-royco.com - phone_number: - type: string - nullable: true - description: The contact's phone number. - example: '5108890293' - details: - type: string - nullable: true - description: The contact's details. - example: Executive Assistant to Tom Wambsgans - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The contact's account. - example: 28b54125-287f-494d-965e-3c5b330c9a68 - x-merge-expands-to: Account - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - x-merge-expands: '{"account": "Account"}' - x-merge-category: ticketing - ContactRequest: - type: object - description: |- - # The Contact Object - ### Description - The `Contact` object is used to represent the customer, lead, or external user that a ticket is associated with. - - ### Usage Example - TODO - properties: - name: - type: string - nullable: true - description: The contact's name. - example: Cousin Greg - email_address: - type: string - nullable: true - description: The contact's email address. - example: greg@waystar-royco.com - phone_number: - type: string - nullable: true - description: The contact's phone number. - example: '5108890293' - details: - type: string - nullable: true - description: The contact's details. - example: Executive Assistant to Tom Wambsgans - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The contact's account. - example: 28b54125-287f-494d-965e-3c5b330c9a68 - x-merge-expands-to: Account - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - x-merge-expands: '{"account": "Account"}' - x-merge-category: ticketing - CreateFieldMappingRequest: - type: object - properties: - target_field_name: - type: string - minLength: 1 - description: The name of the target field you want this remote field to - map to. - example: example_target_field_name - target_field_description: - type: string - minLength: 1 - description: The description of the target field you want this remote field - to map to. - example: this is a example description of the target field - remote_field_traversal_path: - type: array - items: {} - description: The field traversal path of the remote field listed when you - hit the GET /remote-fields endpoint. - example: - - example_remote_field - remote_method: - type: string - minLength: 1 - description: The method of the remote endpoint where the remote field is - coming from. - example: GET - remote_url_path: - type: string - minLength: 1 - description: The path of the remote endpoint where the remote field is coming - from. - example: /example-url-path - common_model_name: - type: string - minLength: 1 - description: The name of the Common Model that the remote field corresponds - to in a given category. - example: ExampleCommonModel - required: - - common_model_name - - remote_field_traversal_path - - remote_method - - remote_url_path - - target_field_description - - target_field_name - x-merge-category: ticketing - DataPassthroughRequest: - type: object - description: |- - # The DataPassthrough Object - ### Description - The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. - - ### Usage Example - Create a `DataPassthrough` to get team hierarchies from your Rippling integration. - properties: - method: - allOf: - - $ref: '#/components/schemas/MethodEnum' - example: POST - path: - type: string - minLength: 1 - description: The path of the request in the third party's platform. - example: /scooters - base_url_override: - type: string - nullable: true - minLength: 1 - description: An optional override of the third party's base url for the - request. - example: https://api.example.com - data: - type: string - nullable: true - minLength: 1 - description: The data with the request. You must include a `request_format` - parameter matching the data's format - example: '{"company": "Lime", "model": "Gen 2.5"}' - multipart_form_data: - type: array - items: - $ref: '#/components/schemas/MultipartFormFieldRequest' - nullable: true - description: Pass an array of `MultipartFormField` objects in here instead - of using the `data` param if `request_format` is set to `MULTIPART`. - headers: - type: object - additionalProperties: {} - nullable: true - description: The headers to use for the request (Merge will handle the account's - authorization headers). `Content-Type` header is required for passthrough. - Choose content type corresponding to expected format of receiving server. - example: - EXTRA-HEADER: value - request_format: - allOf: - - $ref: '#/components/schemas/RequestFormatEnum' - nullable: true - example: JSON - normalize_response: - type: boolean - description: 'Optional. If true, the response will always be an object of - the form `{"type": T, "value": ...}` where `T` will be one of `string, - boolean, number, null, array, object`.' - required: - - method - - path - x-merge-category: ticketing - DebugModeLog: - type: object - properties: - log_id: - type: string - example: 99433219-8017-4acd-bb3c-ceb23d663832 - dashboard_view: - type: string - example: https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 - log_summary: - $ref: '#/components/schemas/DebugModelLogSummary' - example: - url: www.exampleintegration.com/api/v1/exampleapi - method: POST - status_code: 200 - required: - - dashboard_view - - log_id - - log_summary - x-merge-sample-json: '{"log_id": "99433219-8017-4acd-bb3c-ceb23d663832", "dashboard_view": - "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832", "log_summary": - {"url": "www.exampleintegration.com/api/v1/exampleapi", "method": "POST", - "status_code": 200}}' - x-merge-category: ticketing - DebugModelLogSummary: - type: object - properties: - url: - type: string - example: www.exampleintegration.com/api/v1/exampleapi - method: - type: string - example: POST - status_code: - type: integer - example: 200 - required: - - method - - status_code - - url - x-merge-sample-json: '{"url": "www.exampleintegration.com/api/v1/exampleapi", - "method": "POST", "status_code": 200}' - x-merge-category: ticketing - EnabledActionsEnum: - enum: - - READ - - WRITE - type: string - description: |- - * `READ` - READ - * `WRITE` - WRITE - x-merge-category: ticketing - EncodingEnum: - enum: - - RAW - - BASE64 - - GZIP_BASE64 - type: string - description: |- - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - x-merge-category: ticketing - EndUserDetailsRequest: - type: object - properties: - end_user_email_address: - type: string - minLength: 1 - description: Your end user's email address. This is purely for identification - purposes - setting this value will not cause any emails to be sent. - maxLength: 100 - example: example@gmail.com - end_user_organization_name: - type: string - minLength: 1 - description: Your end user's organization. - maxLength: 100 - example: Test Organization - end_user_origin_id: - type: string - minLength: 1 - description: This unique identifier typically represents the ID for your - end user in your product's database. This value must be distinct from - other Linked Accounts' unique identifiers. - maxLength: 100 - example: '12345' - categories: - type: array - items: - $ref: '#/components/schemas/CategoriesEnum' - description: The integration categories to show in Merge Link. - example: - - hris - - ats - integration: - type: string - nullable: true - minLength: 1 - description: The slug of a specific pre-selected integration for this linking - flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. - example: bamboohr - link_expiry_mins: - type: integer - maximum: 10080 - minimum: 30 - default: 30 - description: An integer number of minutes between [30, 720 or 10080 if for - a Magic Link URL] for how long this token is valid. Defaults to 30. - should_create_magic_link_url: - type: boolean - nullable: true - default: false - description: Whether to generate a Magic Link URL. Defaults to false. For - more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - hide_admin_magic_link: - type: boolean - nullable: true - default: false - description: Whether to generate a Magic Link URL on the Admin Needed screen - during the linking flow. Defaults to false. For more information on Magic - Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - common_models: - type: array - items: - $ref: '#/components/schemas/CommonModelScopesBodyRequest' - nullable: true - description: An array of objects to specify the models and fields that will - be disabled for a given Linked Account. Each object uses model_id, enabled_actions, - and disabled_fields to specify the model, method, and fields that are - scoped for a given Linked Account. - category_common_model_scopes: - type: object - additionalProperties: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' - nullable: true - description: When creating a Link Token, you can set permissions for Common - Models that will apply to the account that is going to be linked. Any - model or field not specified in link token payload will default to existing - settings. - example: - hris: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - field_permissions: - enabled_fields: - - first_name - - last_name - - personal_email - disabled_fields: - - preferred_name - - model_name: Employment - model_permissions: - READ: - is_enabled: false - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - effective_date - ats: - - model_name: Job - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - field_permissions: - enabled_fields: - - name - disabled_fields: - - description - - model_name: Department - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: true - language: - oneOf: - - $ref: '#/components/schemas/LanguageEnum' - - type: string - nullable: true - description: |- - The following subset of IETF language tags can be used to configure localization. - - * `en` - en - * `de` - de - example: en - are_syncs_disabled: - type: boolean - nullable: true - default: false - description: The boolean that indicates whether initial, periodic, and force - syncs will be disabled. - integration_specific_config: - type: object - additionalProperties: {} - nullable: true - description: A JSON object containing integration-specific configuration - options. - example: - rippling: - oauth_code: 3h1jj8ssdf31dfji3o1jjdfjasd - required: - - categories - - end_user_email_address - - end_user_organization_name - - end_user_origin_id - x-merge-category: ticketing - ErrorValidationProblem: - type: object - properties: - source: - $ref: '#/components/schemas/ValidationProblemSource' - example: - pointer: /model/custom_fields - title: - type: string - example: Missing Required Field - detail: - type: string - example: custom_fields is a required field on model. - problem_type: - type: string - example: MISSING_REQUIRED_FIELD - required: - - detail - - problem_type - - title - x-merge-category: ticketing - EventTypeEnum: - enum: - - CREATED_REMOTE_PRODUCTION_API_KEY - - DELETED_REMOTE_PRODUCTION_API_KEY - - CREATED_TEST_API_KEY - - DELETED_TEST_API_KEY - - REGENERATED_PRODUCTION_API_KEY - - REGENERATED_WEBHOOK_SIGNATURE - - INVITED_USER - - TWO_FACTOR_AUTH_ENABLED - - TWO_FACTOR_AUTH_DISABLED - - DELETED_LINKED_ACCOUNT - - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - - CREATED_DESTINATION - - DELETED_DESTINATION - - CHANGED_DESTINATION - - CHANGED_SCOPES - - CHANGED_PERSONAL_INFORMATION - - CHANGED_ORGANIZATION_SETTINGS - - ENABLED_INTEGRATION - - DISABLED_INTEGRATION - - ENABLED_CATEGORY - - DISABLED_CATEGORY - - CHANGED_PASSWORD - - RESET_PASSWORD - - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - - FORCED_LINKED_ACCOUNT_RESYNC - - MUTED_ISSUE - - GENERATED_MAGIC_LINK - - ENABLED_MERGE_WEBHOOK - - DISABLED_MERGE_WEBHOOK - - MERGE_WEBHOOK_TARGET_CHANGED - - END_USER_CREDENTIALS_ACCESSED - type: string - description: |- - * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE - * `INVITED_USER` - INVITED_USER - * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT - * `CREATED_DESTINATION` - CREATED_DESTINATION - * `DELETED_DESTINATION` - DELETED_DESTINATION - * `CHANGED_DESTINATION` - CHANGED_DESTINATION - * `CHANGED_SCOPES` - CHANGED_SCOPES - * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - * `ENABLED_CATEGORY` - ENABLED_CATEGORY - * `DISABLED_CATEGORY` - DISABLED_CATEGORY - * `CHANGED_PASSWORD` - CHANGED_PASSWORD - * `RESET_PASSWORD` - RESET_PASSWORD - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING - * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - * `MUTED_ISSUE` - MUTED_ISSUE - * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - x-merge-category: ticketing - ExternalTargetFieldAPI: - type: object - properties: - name: - type: string - nullable: true - readOnly: true - example: example_target_field_name - description: - type: string - nullable: true - readOnly: true - example: this is a example description of a target field - is_mapped: - type: string - nullable: true - readOnly: true - example: true - x-merge-category: ticketing - ExternalTargetFieldAPIResponse: - type: object - properties: - Ticket: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Comment: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Project: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Collection: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - User: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Role: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Account: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Team: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Attachment: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Tag: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - Contact: - type: array - items: - $ref: '#/components/schemas/ExternalTargetFieldAPI' - x-merge-category: ticketing - FieldFormatEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - type: string - description: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - x-merge-category: ticketing - FieldMappingApiInstance: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - is_integration_wide: - type: boolean - readOnly: true - target_field: - type: object - properties: - name: - type: string - description: - type: string - is_organization_wide: - type: boolean - required: - - description - - is_organization_wide - - name - nullable: true - readOnly: true - example: - name: example_target_field_name - description: this is a example description of a target field - is_organization_wide: true - remote_field: - type: object - properties: - remote_key_name: - type: string - nullable: true - schema: - type: object - additionalProperties: {} - nullable: true - remote_endpoint_info: - type: object - properties: - method: - type: string - nullable: true - url_path: - type: string - nullable: true - field_traversal_path: - type: array - items: - type: string - nullable: true - required: - - field_traversal_path - - method - - url_path - required: - - remote_endpoint_info - - remote_key_name - - schema - nullable: true - readOnly: true - example: - remote_key_name: example_remote_field_key - schema: - type: string - remote_endpoint_info: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_remote_field_key - x-merge-category: ticketing - FieldMappingApiInstanceResponse: - type: object - properties: - Ticket: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Comment: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Project: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Collection: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - User: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Role: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Account: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Team: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Attachment: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Tag: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - Contact: - type: array - items: - $ref: '#/components/schemas/FieldMappingApiInstance' - x-merge-category: ticketing - FieldMappingInstanceResponse: - type: object - properties: - model: - $ref: '#/components/schemas/FieldMappingApiInstance' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: ticketing - FieldPermissionDeserializer: - type: object - properties: - enabled_fields: - type: array - items: {} - disabled_fields: - type: array - items: {} - x-merge-category: ticketing - FieldPermissionDeserializerRequest: - type: object - properties: - enabled_fields: - type: array - items: {} - disabled_fields: - type: array - items: {} - x-merge-category: ticketing - FieldTypeEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - type: string - description: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - x-merge-category: ticketing - GenerateRemoteKeyRequest: - type: object - description: |- - # The GenerateRemoteKey Object - ### Description - The `GenerateRemoteKey` object is used to represent a request for a new remote key. - - ### Usage Example - Post a `GenerateRemoteKey` to create a new remote key. - properties: - name: - type: string - minLength: 1 - description: The name of the remote key - example: Remote Deployment Key 1 - required: - - name - x-merge-category: ticketing - IndividualCommonModelScopeDeserializer: - type: object - properties: - model_name: - type: string - model_permissions: - type: object - additionalProperties: - $ref: '#/components/schemas/ModelPermissionDeserializer' - field_permissions: - $ref: '#/components/schemas/FieldPermissionDeserializer' - required: - - model_name - x-merge-category: ticketing - IndividualCommonModelScopeDeserializerRequest: - type: object - properties: - model_name: - type: string - minLength: 1 - model_permissions: - type: object - additionalProperties: - $ref: '#/components/schemas/ModelPermissionDeserializerRequest' - field_permissions: - $ref: '#/components/schemas/FieldPermissionDeserializerRequest' - required: - - model_name - x-merge-category: ticketing - Issue: - type: object - properties: - id: - type: string - format: uuid - readOnly: true - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - status: - oneOf: - - $ref: '#/components/schemas/IssueStatusEnum' - - type: string - description: |- - Status of the issue. Options: ('ONGOING', 'RESOLVED') - - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - example: ONGOING - error_description: - type: string - example: Missing Permissions - end_user: - type: object - additionalProperties: {} - readOnly: true - example: b82302de-852e-4e60-b050-edf9da3b7c02 - first_incident_time: - type: string - format: date-time - nullable: true - example: '2022-12-05T16:19:15.161Z' - last_incident_time: - type: string - format: date-time - nullable: true - example: '2022-12-05T16:19:15.161Z' - is_muted: - type: boolean - readOnly: true - example: true - error_details: - type: array - items: - type: string - readOnly: true - example: - - Missing employee permissions. - - Missing time off permissions. - required: - - error_description - x-merge-category: ticketing - IssueStatusEnum: - enum: - - ONGOING - - RESOLVED - type: string - description: |- - * `ONGOING` - ONGOING - * `RESOLVED` - RESOLVED - x-merge-category: ticketing - ItemFormatEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - type: string - description: |- - * `string` - uuid - * `number` - url - * `date` - email - * `datetime` - phone - * `bool` - currency - * `list` - decimal - x-merge-category: ticketing - ItemSchema: - type: object - properties: - item_type: - $ref: '#/components/schemas/ItemTypeEnum' - item_format: - $ref: '#/components/schemas/ItemFormatEnum' - item_choices: - type: array - items: - type: string - x-merge-category: ticketing - ItemTypeEnum: - enum: - - string - - number - - date - - datetime - - bool - - list - type: string - description: |- - * `string` - string - * `number` - number - * `date` - date - * `datetime` - datetime - * `bool` - bool - * `list` - list - x-merge-category: ticketing - LanguageEnum: - enum: - - en - - de - type: string - description: |- - * `en` - en - * `de` - de - x-merge-category: ticketing - LastSyncResultEnum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - type: string - description: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - x-merge-category: ticketing - LinkToken: - type: object - properties: - link_token: - type: string - example: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 - integration_name: - type: string - example: Lever - magic_link_url: - type: string - example: https://link.merge.dev/asdfjkl12345jsndfgi2i83n - required: - - link_token - x-merge-category: ticketing - LinkedAccountCommonModelScopeDeserializerRequest: - type: object - properties: - common_models: - type: array - items: - $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' - description: The common models you want to update the scopes for - example: - - model_name: Employee - model_permissions: - READ: - is_enabled: true - WRITE: - is_enabled: false - field_permissions: - enabled_fields: - - avatar - - home_location - disabled_fields: - - work_location - - model_name: Benefit - model_permissions: - WRITE: - is_enabled: false - required: - - common_models - x-merge-category: ticketing - LinkedAccountStatus: - type: object - properties: - linked_account_status: - type: string - can_make_request: - type: boolean - required: - - can_make_request - - linked_account_status - x-merge-category: ticketing - MetaResponse: - type: object - properties: - request_schema: - type: object - additionalProperties: {} - example: - type: object - properties: - model: - type: object - required: - - last_name - - first_name - - merge_categories - - new_york_city_neighborhood - - favorite_tv_shows - - favorite_watch - properties: - email_addresses: - type: array - items: - type: object - properties: - value: - type: string - title: value - email_address_type: - type: string - title: email_address_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: email_addresses - description: Array of email_addresses objects - urls: - type: array - items: - type: object - properties: - value: - type: string - title: value - url_type: - type: string - title: url_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: urls - description: Array of urls objects - first_name: - type: string - title: first_name - description: The first name. - last_name: - type: string - title: last_name - description: The last name. - phone_numbers: - type: array - items: - type: object - properties: - value: - type: string - title: value - phone_number_type: - type: string - title: phone_number_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: phone_numbers - description: Array of phone_numbers objects - tags: - type: array - items: - type: string - format: uuid - title: tags - description: Array of tags names - attachments: - type: array - items: - type: object - properties: - id: - type: string - title: id - file_url: - type: string - title: file_url - file_name: - type: string - title: file_name - attachment_type: - type: string - title: attachment_type - integration_params: - type: object - title: integration_params - properties: {} - linked_account_params: - type: object - title: linked_account_params - properties: {} - title: attachments - description: 'Array of attachments objects ' - merge_categories: - type: array - categories: - type: string - enum: - - HRIS - - ATS - - Accounting - - Ticketing - - File Storage - - CRM - - Marketing Automation - enum_information: - - value: HRIS - description: Merge HRIS Category - - value: ATS - description: Merge ATS Category - - value: Accounting - description: Merge Accounting Category - - value: Ticketing - description: Merge Ticketing Category - - value: File Storage - description: Merge File Storage Category - - value: CRM - description: Merge CRM Category - - value: Marketing Automation - description: Merge Marketing Automation Category - title: Merge Categories - description: Array of Merge's Unified API Categories - new_york_city_neighborhood: - type: string - title: Borough - description: One of the 5 Boroughs of New York City - favorite_tv_shows: - type: array - items: - type: string - format: uuid - title: Favorite TV Shows - description: Array of TV Show objects on merge.tv_shows - favorite_watch: - type: string - title: Favorite Watch - description: Favorite watch of all time - remote_field_classes: - type: object - additionalProperties: {} - status: - $ref: '#/components/schemas/LinkedAccountStatus' - example: - linked_account_status: COMPLETE - can_make_request: true - has_conditional_params: - type: boolean - has_required_linked_account_params: - type: boolean - required: - - has_conditional_params - - has_required_linked_account_params - - request_schema - x-merge-category: ticketing - MethodEnum: - enum: - - GET - - OPTIONS - - HEAD - - POST - - PUT - - PATCH - - DELETE - type: string - description: |- - * `GET` - GET - * `OPTIONS` - OPTIONS - * `HEAD` - HEAD - * `POST` - POST - * `PUT` - PUT - * `PATCH` - PATCH - * `DELETE` - DELETE - x-merge-category: ticketing - ModelOperation: - type: object - description: |- - # The ModelOperation Object - ### Description - The `ModelOperation` object is used to represent the operations that are currently supported for a given model. - - ### Usage Example - View what operations are supported for the `Candidate` endpoint. - properties: - model_name: - type: string - example: Candidate - available_operations: - type: array - items: - type: string - example: - - FETCH - - CREATE - required_post_parameters: - type: array - items: - type: string - example: - - remote_user_id - supported_fields: - type: array - items: - type: string - example: - - first_name - - last_name - - company - - title - required: - - available_operations - - model_name - - required_post_parameters - - supported_fields - x-merge-category: ticketing - ModelPermissionDeserializer: - type: object - properties: - is_enabled: - type: boolean - x-merge-category: ticketing - ModelPermissionDeserializerRequest: - type: object - properties: - is_enabled: - type: boolean - x-merge-category: ticketing - MultipartFormFieldRequest: - type: object - description: |- - # The MultipartFormField Object - ### Description - The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. - - ### Usage Example - Create a `MultipartFormField` to define a multipart form entry. - properties: - name: - type: string - minLength: 1 - description: The name of the form field - example: resume - data: - type: string - minLength: 1 - description: The data for the form field. - example: SW50ZWdyYXRlIGZhc3QKSW50ZWdyYXRlIG9uY2U= - encoding: - oneOf: - - $ref: '#/components/schemas/EncodingEnum' - - type: string - nullable: true - default: RAW - description: |- - The encoding of the value of `data`. Defaults to `RAW` if not defined. - - * `RAW` - RAW - * `BASE64` - BASE64 - * `GZIP_BASE64` - GZIP_BASE64 - example: BASE64 - file_name: - type: string - nullable: true - minLength: 1 - description: The file name of the form field, if the field is for a file. - example: resume.pdf - content_type: - type: string - nullable: true - minLength: 1 - description: The MIME type of the file, if the field is for a file. - example: application/pdf - required: - - data - - name - x-merge-category: ticketing - PaginatedAccountDetailsAndActionsList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/AccountDetailsAndActions' - x-merge-category: ticketing - PaginatedAccountList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Account' - x-merge-category: ticketing - PaginatedAttachmentList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Attachment' - x-merge-category: ticketing - PaginatedAuditLogEventList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/AuditLogEvent' - x-merge-category: ticketing - PaginatedCollectionList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Collection' - x-merge-category: ticketing - PaginatedCommentList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Comment' - x-merge-category: ticketing - PaginatedContactList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Contact' - x-merge-category: ticketing - PaginatedIssueList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Issue' - x-merge-category: ticketing - PaginatedProjectList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Project' - x-merge-category: ticketing - PaginatedRemoteFieldClassList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/RemoteFieldClass' - x-merge-category: ticketing - PaginatedRoleList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Role' - x-merge-category: ticketing - PaginatedSyncStatusList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/SyncStatus' - x-merge-category: ticketing - PaginatedTagList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Tag' - x-merge-category: ticketing - PaginatedTeamList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Team' - x-merge-category: ticketing - PaginatedTicketList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Ticket' - x-merge-category: ticketing - PaginatedUserList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/User' - x-merge-category: ticketing - PaginatedViewerList: - type: object - properties: - next: - type: string - nullable: true - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: - type: string - nullable: true - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - type: array - items: - $ref: '#/components/schemas/Viewer' - x-merge-category: ticketing - PatchedEditFieldMappingRequest: - type: object - properties: - remote_field_traversal_path: - type: array - items: {} - description: The field traversal path of the remote field listed when you - hit the GET /remote-fields endpoint. - example: - - example_remote_field_name - remote_method: - type: string - minLength: 1 - description: The method of the remote endpoint where the remote field is - coming from. - example: GET - remote_url_path: - type: string - minLength: 1 - description: The path of the remote endpoint where the remote field is coming - from. - example: /example-url-path - x-merge-category: ticketing - PatchedTicketEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/PatchedTicketRequest' - required: - - model - x-merge-category: ticketing - PatchedTicketRequest: - type: object - description: |- - # The Ticket Object - ### Description - The `Ticket` object is used to represent a ticket, issue, task or case. - ### Usage Example - TODO - properties: - name: - type: string - nullable: true - description: The ticket's name. - example: Please add more integrations - assignees: - type: array - items: - type: string - format: uuid - nullable: true - description: The individual `Users` who are assigned to this ticket. This - does not include `Users` who just have view access to this ticket. To - fetch all `Users` and `Teams` that can access the ticket, use the `GET - /tickets/{ticket_id}/viewers` [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). - example: - - 17a54124-287f-494d-965e-3c5b330c9a68 - assigned_teams: - type: array - items: - type: string - format: uuid - nullable: true - description: The `Teams` that are assigned to this ticket. This does not - include `Teams` who just have view access to this ticket. To fetch all - `Users` and `Teams` that can access this ticket, use the `GET /tickets/{ticket_id}/viewers` - [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). - example: - - 4857c306-c1f9-489e-a6b6-90902f736dfe - creator: - type: string - format: uuid - nullable: true - description: The user who created this ticket. - due_date: - type: string - format: date-time - nullable: true - description: The ticket's due date. - example: '2022-10-11T00:00:00Z' - status: - oneOf: - - $ref: '#/components/schemas/TicketStatusEnum' - - type: string - nullable: true - description: |- - The current status of the ticket. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - * `IN_PROGRESS` - IN_PROGRESS - * `ON_HOLD` - ON_HOLD - example: OPEN - description: - type: string - nullable: true - description: The ticket’s description. HTML version of description is mapped - if supported by the third-party platform. - example: Can you please add more integrations? It'll make syncing data much - easier! - collections: - type: array - items: - type: string - format: uuid - nullable: true - description: The `Collections` that this `Ticket` is included in. - example: - - fb8c55b6-1cb8-4b4c-9fb6-17924231619d - ticket_type: - type: string - nullable: true - description: The sub category of the ticket within the 3rd party system. - Examples include incident, task, subtask or to-do. - example: incident - account: - type: string - format: uuid - nullable: true - description: The account associated with the ticket. - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - contact: - type: string - format: uuid - nullable: true - description: The contact associated with the ticket. - example: 65c345ba-6870-4974-87ba-dd31509c367a - parent_ticket: - type: string - format: uuid - nullable: true - description: The ticket's parent ticket. - example: 75b33d04-30d2-4f3e-be45-27838bc94342 - access_level: - oneOf: - - $ref: '#/components/schemas/TicketAccessLevelEnum' - - type: string - nullable: true - description: |- - The description of who is able to access a given ticket, or where access is inherited from. - - * `COMPANY` - COMPANY - * `PUBLIC` - PUBLIC - * `PRIVATE` - PRIVATE - * `COLLECTION` - COLLECTION - example: PRIVATE - tags: - type: array - items: - type: string - nullable: true - description: The tag's name. - example: - - enterprise - - other-tag - roles: - type: array - items: - type: string - format: uuid - nullable: true - example: - - 21a54124-397f-494d-985e-3c5b330b8a68 - - 17a54124-287f-494d-965e-3c5b330c9a68 - completed_at: - type: string - format: date-time - nullable: true - description: When the ticket was completed. - example: '2021-12-09T00:00:00Z' - ticket_url: - type: string - format: uri - nullable: true - description: The 3rd party url of the Ticket. - maxLength: 2000 - example: https://thirdpartysoftware.com/project/3/issue/1 - priority: - oneOf: - - $ref: '#/components/schemas/PriorityEnum' - - type: string - nullable: true - description: |- - The priority or urgency of the Ticket. - - * `URGENT` - URGENT - * `HIGH` - HIGH - * `NORMAL` - NORMAL - * `LOW` - LOW - example: HIGH - $ref: '#/components/schemas/PriorityEnum' - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-category: ticketing - PriorityEnum: - enum: - - URGENT - - HIGH - - NORMAL - - LOW - type: string - description: |- - * `URGENT` - URGENT - * `HIGH` - HIGH - * `NORMAL` - NORMAL - * `LOW` - LOW - x-merge-category: ticketing - Project: - type: object - description: |- - # The Project Object - ### Description - Please use the `Collection` model. This model will be fully deprecated on 3/30/2024. - - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: fb8c55b6-1cb8-4b4c-9fb6-17924231619d - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: "The project's name. " - example: Q1 Platform - description: - type: string - nullable: true - description: The project's description. - example: For tracking all tasks related to Platform for Q1 - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - x-merge-expands: '{"company": "CompanyInfo", "contact": "Contact"}' - x-merge-category: ticketing - RemoteData: - type: object - description: |- - # The RemoteData Object - ### Description - The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. - - ### Usage Example - TODO - properties: - path: - type: string - description: The third-party API path that is being called. - example: /platform-endpoint - data: - readOnly: true - description: The data returned from the third-party for this object in its - original, unnormalized format. - example: - - Varies by platform - required: - - path - x-merge-category: ticketing - RemoteEndpointInfo: - type: object - properties: - method: - type: string - example: GET - url_path: - type: string - example: /example-url-path - field_traversal_path: - type: array - items: {} - example: - - example_key_name - required: - - field_traversal_path - - method - - url_path - x-merge-category: ticketing - RemoteField: - type: object - properties: - remote_field_class: - oneOf: - - type: string - - $ref: '#/components/schemas/RemoteFieldClass' - x-merge-expands-to: RemoteFieldClass - value: - nullable: true - example: string - required: - - remote_field_class - x-merge-expands: '{"remote_field_class": "RemoteFieldClass"}' - x-merge-category: ticketing - RemoteFieldAPI: - type: object - properties: - schema: - type: object - additionalProperties: {} - example: - type: string - remote_key_name: - type: string - example: example_remote_key_name - remote_endpoint_info: - $ref: '#/components/schemas/RemoteEndpointInfo' - example: - method: GET - url_path: /example-url-path - field_traversal_path: - - example_key_name - example_values: - type: array - items: {} - nullable: true - example: - - example - advanced_metadata: - allOf: - - $ref: '#/components/schemas/AdvancedMetadata' - nullable: true - coverage: - oneOf: - - type: integer - - type: number - format: double - nullable: true - readOnly: true - example: 0.33 - required: - - advanced_metadata - - remote_endpoint_info - - remote_key_name - - schema - x-merge-category: ticketing - RemoteFieldAPIResponse: - type: object - properties: - Ticket: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Comment: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Project: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Collection: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - User: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Role: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Account: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Team: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Attachment: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Tag: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - Contact: - type: array - items: - $ref: '#/components/schemas/RemoteFieldAPI' - x-merge-category: ticketing - RemoteFieldClass: - type: object - properties: - id: - type: string - display_name: - type: string - remote_key_name: - type: string - description: - type: string - is_custom: - type: boolean - is_common_model_field: - type: boolean - is_required: - type: boolean - field_type: - $ref: '#/components/schemas/FieldTypeEnum' - field_format: - $ref: '#/components/schemas/FieldFormatEnum' - field_choices: - type: array - items: - type: object - properties: - value: - nullable: true - display_name: - type: string - nullable: true - nullable: true - readOnly: true - item_schema: - $ref: '#/components/schemas/ItemSchema' - x-merge-category: ticketing - RemoteFieldRequest: - type: object - properties: - remote_field_class: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/RemoteFieldClass' - example: b057d1d2-c204-4da8-a74c-c91d1a260614 - x-merge-expands-to: RemoteFieldClass - value: - nullable: true - example: string - required: - - remote_field_class - x-merge-expands: '{"remote_field_class": "RemoteFieldClass"}' - x-merge-category: ticketing - RemoteKey: - type: object - description: |- - # The RemoteKey Object - ### Description - The `RemoteKey` object is used to represent a request for a new remote key. - - ### Usage Example - Post a `GenerateRemoteKey` to receive a new `RemoteKey`. - properties: - name: - type: string - example: Remote Deployment Key 1 - key: - type: string - example: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA - required: - - key - - name - x-merge-category: ticketing - RemoteKeyForRegenerationRequest: - type: object - description: |- - # The RemoteKeyForRegeneration Object - ### Description - The `RemoteKeyForRegeneration` object is used to exchange an old remote key for a new one - - ### Usage Example - Post a `RemoteKeyForRegeneration` to swap out an old remote key for a new one - properties: - name: - type: string - minLength: 1 - description: The name of the remote key - example: Remote Deployment Key 1 - required: - - name - x-merge-category: ticketing - RemoteResponse: - type: object - description: |- - # The RemoteResponse Object - ### Description - The `RemoteResponse` object is used to represent information returned from a third-party endpoint. - - ### Usage Example - View the `RemoteResponse` returned from your `DataPassthrough`. - properties: - method: - type: string - example: GET - path: - type: string - example: /scooters - status: - type: integer - example: 200 - response: - example: - scooters: - - company: Lime - model: Gen 2.5 - - company: Bird - model: Bird Zero - response_headers: - type: object - additionalProperties: {} - example: - X-Page-Token: value - response_type: - oneOf: - - $ref: '#/components/schemas/ResponseTypeEnum' - - type: string - example: JSON - headers: - type: object - additionalProperties: {} - example: - EXTRA-HEADER: value - Authorization: - required: - - method - - path - - response - - status - x-merge-category: ticketing - RequestFormatEnum: - enum: - - JSON - - XML - - MULTIPART - type: string - description: |- - * `JSON` - JSON - * `XML` - XML - * `MULTIPART` - MULTIPART - x-merge-category: ticketing - ResponseTypeEnum: - enum: - - JSON - - BASE64_GZIP - type: string - description: |- - * `JSON` - JSON - * `BASE64_GZIP` - BASE64_GZIP - x-merge-category: ticketing - Role: - type: object - description: |- - # The Role Object - ### Description - The `Role` object is used to represent the set of actions & access that a user with this role is allowed to perform. - - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 23454124-387f-494d-265e-345b330c9123 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '123' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The name of the Role. - example: Member - ticket_actions: - type: array - items: - oneOf: - - $ref: '#/components/schemas/TicketActionsEnum' - - type: string - nullable: true - nullable: true - description: 'The set of actions that a User with this Role can perform. - Possible enum values include: `VIEW`, `CREATE`, `EDIT`, `DELETE`, `CLOSE`, - and `ASSIGN`.' - example: - - VIEW - - EDIT - - CREATE - ticket_access: - oneOf: - - $ref: '#/components/schemas/TicketAccessEnum' - - type: string - nullable: true - description: |- - The level of Ticket access that a User with this Role can perform. - - * `ALL` - ALL - * `ASSIGNED_ONLY` - ASSIGNED_ONLY - * `TEAM_ONLY` - TEAM_ONLY - example: ASSIGNED_ONLY - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - x-merge-category: ticketing - RoleEnum: - enum: - - ADMIN - - DEVELOPER - - MEMBER - - API - - SYSTEM - - MERGE_TEAM - type: string - description: |- - * `ADMIN` - ADMIN - * `DEVELOPER` - DEVELOPER - * `MEMBER` - MEMBER - * `API` - API - * `SYSTEM` - SYSTEM - * `MERGE_TEAM` - MERGE_TEAM - x-merge-category: ticketing - SelectiveSyncConfigurationsUsageEnum: - enum: - - IN_NEXT_SYNC - - IN_LAST_SYNC - type: string - description: |- - * `IN_NEXT_SYNC` - IN_NEXT_SYNC - * `IN_LAST_SYNC` - IN_LAST_SYNC - x-merge-category: ticketing - StatusFd5Enum: - enum: - - SYNCING - - DONE - - FAILED - - DISABLED - - PAUSED - - PARTIALLY_SYNCED - type: string - description: |- - * `SYNCING` - SYNCING - * `DONE` - DONE - * `FAILED` - FAILED - * `DISABLED` - DISABLED - * `PAUSED` - PAUSED - * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED - x-merge-category: ticketing - SyncStatus: - type: object - description: |- - # The SyncStatus Object - ### Description - The `SyncStatus` object is used to represent the syncing state of an account - - ### Usage Example - View the `SyncStatus` for an account to see how recently its models were synced. - properties: - model_name: - type: string - example: Ticket - model_id: - type: string - example: ticketing.Ticket - last_sync_start: - type: string - format: date-time - example: '2021-03-30T19:44:18.695973Z' - next_sync_start: - type: string - format: date-time - example: '2021-03-30T20:44:18.662942Z' - last_sync_result: - oneOf: - - $ref: '#/components/schemas/LastSyncResultEnum' - - type: string - example: DONE - last_sync_finished: - type: string - format: date-time - example: '2021-03-30T19:55:18.695973Z' - status: - oneOf: - - $ref: '#/components/schemas/StatusFd5Enum' - - type: string - example: SYNCING - is_initial_sync: - type: boolean - example: true - selective_sync_configurations_usage: - $ref: '#/components/schemas/SelectiveSyncConfigurationsUsageEnum' - required: - - is_initial_sync - - model_id - - model_name - - status - x-merge-sample-json: '{"model_name": "Candidate", "model_id": "ats.Candidate", - "last_sync_start": "2021-03-30T19:44:18.695973Z", "next_sync_start": "2021-03-30T20:44:18.662942Z", - "status": "SYNCING", "is_initial_sync": true}' - x-merge-category: ticketing - Tag: - type: object - description: |- - # The Tag Object - ### Description - The `Tag` object is used to represent a tag or label for a ticket. - - ### Usage Example - TODO - properties: - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - id: - type: string - format: uuid - readOnly: true - example: 17a54124-287f-494d-965e-3c5b330c9a68 - name: - type: string - nullable: true - description: The tag's name. - example: Ticketing API - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - x-merge-category: ticketing - Team: - type: object - description: |- - # The Team Object - ### Description - The `Team` object is used to represent one or more `Users` within the company receiving the ticket. - - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The team's name. - example: Platform - description: - type: string - nullable: true - description: The team's description. - example: Platform and Integrations Team - remote_was_deleted: - type: boolean - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - x-merge-expands: '{"parent_team": "Team"}' - x-merge-category: ticketing - Ticket: - type: object - description: |- - # The Ticket Object - ### Description - The `Ticket` object is used to represent a ticket, issue, task or case. - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The ticket's name. - example: Please add more integrations - assignees: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The individual `Users` who are assigned to this ticket. This - does not include `Users` who just have view access to this ticket. To - fetch all `Users` and `Teams` that can access the ticket, use the `GET - /tickets/{ticket_id}/viewers` [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). - example: - - 17a54124-287f-494d-965e-3c5b330c9a68 - x-merge-expands-to: User - assigned_teams: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Team' - nullable: true - description: The `Teams` that are assigned to this ticket. This does not - include `Teams` who just have view access to this ticket. To fetch all - `Users` and `Teams` that can access this ticket, use the `GET /tickets/{ticket_id}/viewers` - [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). - example: - - 4857c306-c1f9-489e-a6b6-90902f736dfe - x-merge-expands-to: Team - creator: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The user who created this ticket. - x-merge-expands-to: User - due_date: - type: string - format: date-time - nullable: true - description: The ticket's due date. - example: '2022-10-11T00:00:00Z' - status: - oneOf: - - $ref: '#/components/schemas/TicketStatusEnum' - - type: string - nullable: true - description: |- - The current status of the ticket. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - * `IN_PROGRESS` - IN_PROGRESS - * `ON_HOLD` - ON_HOLD - example: OPEN - description: - type: string - nullable: true - description: The ticket’s description. HTML version of description is mapped - if supported by the third-party platform. - example: Can you please add more integrations? It'll make syncing data much - easier! - collections: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Collection' - nullable: true - description: The `Collections` that this `Ticket` is included in. - example: - - fb8c55b6-1cb8-4b4c-9fb6-17924231619d - x-merge-expands-to: Collection - ticket_type: - type: string - nullable: true - description: The sub category of the ticket within the 3rd party system. - Examples include incident, task, subtask or to-do. - example: incident - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The account associated with the ticket. - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - x-merge-expands-to: Account - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The contact associated with the ticket. - example: 65c345ba-6870-4974-87ba-dd31509c367a - x-merge-expands-to: Contact - parent_ticket: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Ticket' - nullable: true - description: The ticket's parent ticket. - example: 75b33d04-30d2-4f3e-be45-27838bc94342 - x-merge-expands-to: Ticket - attachments: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Attachment' - nullable: true - example: - - 42747df1-95e7-46e2-93cc-66f1191edca5 - - 92f972d0-2526-434b-9409-4c3b468e08f0 - x-merge-expands-to: Attachment - access_level: - oneOf: - - $ref: '#/components/schemas/TicketAccessLevelEnum' - - type: string - nullable: true - description: |- - The description of who is able to access a given ticket, or where access is inherited from. - - * `COMPANY` - COMPANY - * `PUBLIC` - PUBLIC - * `PRIVATE` - PRIVATE - * `COLLECTION` - COLLECTION - example: PRIVATE - tags: - type: array - items: - type: string - nullable: true - description: The tag's name. - example: - - enterprise - - other-tag - roles: - type: array - items: - type: string - format: uuid - nullable: true - example: - - 21a54124-397f-494d-985e-3c5b330b8a68 - - 17a54124-287f-494d-965e-3c5b330c9a68 - ticket_url: - type: string - format: uri - nullable: true - description: The 3rd party url of the Ticket. - maxLength: 2000 - example: https://thirdpartysoftware.com/project/3/issue/1 - priority: - oneOf: - - $ref: '#/components/schemas/PriorityEnum' - - type: string - nullable: true - description: |- - The priority or urgency of the Ticket. - - * `URGENT` - URGENT - * `HIGH` - HIGH - * `NORMAL` - NORMAL - * `LOW` - LOW - example: HIGH - remote_created_at: - type: string - format: date-time - nullable: true - description: When the third party's ticket was created. - example: '2021-11-10T00:00:00Z' - remote_updated_at: - type: string - format: date-time - nullable: true - description: When the third party's ticket was updated. - example: '2021-12-09T00:00:00Z' - completed_at: - type: string - format: date-time - nullable: true - description: When the ticket was completed. - example: '2021-12-09T00:00:00Z' - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteField' - readOnly: true - x-merge-expands: '{"account": "Account", "assigned_teams": "Team", "assignees": - "User", "attachments": "Attachment", "collections": "Collection", "contact": - "Contact", "creator": "User", "parent_ticket": "Ticket"}' - x-merge-category: ticketing - TicketAccessEnum: - enum: - - ALL - - ASSIGNED_ONLY - - TEAM_ONLY - type: string - description: |- - * `ALL` - ALL - * `ASSIGNED_ONLY` - ASSIGNED_ONLY - * `TEAM_ONLY` - TEAM_ONLY - x-merge-category: ticketing - TicketAccessLevelEnum: - enum: - - COMPANY - - PUBLIC - - PRIVATE - - COLLECTION - type: string - description: |- - * `COMPANY` - COMPANY - * `PUBLIC` - PUBLIC - * `PRIVATE` - PRIVATE - * `COLLECTION` - COLLECTION - x-merge-category: ticketing - TicketActionsEnum: - enum: - - VIEW - - CREATE - - EDIT - - DELETE - - CLOSE - - ASSIGN - type: string - description: |- - * `VIEW` - VIEW - * `CREATE` - CREATE - * `EDIT` - EDIT - * `DELETE` - DELETE - * `CLOSE` - CLOSE - * `ASSIGN` - ASSIGN - x-merge-category: ticketing - TicketEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/TicketRequest' - required: - - model - x-merge-category: ticketing - TicketRequest: - type: object - description: |- - # The Ticket Object - ### Description - The `Ticket` object is used to represent a ticket, issue, task or case. - ### Usage Example - TODO - properties: - name: - type: string - nullable: true - description: The ticket's name. - example: Please add more integrations - assignees: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The individual `Users` who are assigned to this ticket. This - does not include `Users` who just have view access to this ticket. To - fetch all `Users` and `Teams` that can access the ticket, use the `GET - /tickets/{ticket_id}/viewers` [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). - example: - - 17a54124-287f-494d-965e-3c5b330c9a68 - x-merge-expands-to: User - assigned_teams: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Team' - nullable: true - description: The `Teams` that are assigned to this ticket. This does not - include `Teams` who just have view access to this ticket. To fetch all - `Users` and `Teams` that can access this ticket, use the `GET /tickets/{ticket_id}/viewers` - [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). - example: - - 4857c306-c1f9-489e-a6b6-90902f736dfe - x-merge-expands-to: Team - creator: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The user who created this ticket. - x-merge-expands-to: User - due_date: - type: string - format: date-time - nullable: true - description: The ticket's due date. - example: '2022-10-11T00:00:00Z' - status: - oneOf: - - $ref: '#/components/schemas/TicketStatusEnum' - - type: string - nullable: true - description: |- - The current status of the ticket. - - * `OPEN` - OPEN - * `CLOSED` - CLOSED - * `IN_PROGRESS` - IN_PROGRESS - * `ON_HOLD` - ON_HOLD - example: OPEN - description: - type: string - nullable: true - description: The ticket’s description. HTML version of description is mapped - if supported by the third-party platform. - example: Can you please add more integrations? It'll make syncing data much - easier! - collections: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Collection' - nullable: true - description: The `Collections` that this `Ticket` is included in. - example: - - fb8c55b6-1cb8-4b4c-9fb6-17924231619d - x-merge-expands-to: Collection - ticket_type: - type: string - nullable: true - description: The sub category of the ticket within the 3rd party system. - Examples include incident, task, subtask or to-do. - example: incident - account: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Account' - nullable: true - description: The account associated with the ticket. - example: 0958cbc6-6040-430a-848e-aafacbadf4ae - x-merge-expands-to: Account - contact: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Contact' - nullable: true - description: The contact associated with the ticket. - example: 65c345ba-6870-4974-87ba-dd31509c367a - x-merge-expands-to: Contact - parent_ticket: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Ticket' - nullable: true - description: The ticket's parent ticket. - example: 75b33d04-30d2-4f3e-be45-27838bc94342 - x-merge-expands-to: Ticket - attachments: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Attachment' - nullable: true - example: - - 42747df1-95e7-46e2-93cc-66f1191edca5 - - 92f972d0-2526-434b-9409-4c3b468e08f0 - x-merge-expands-to: Attachment - access_level: - oneOf: - - $ref: '#/components/schemas/TicketAccessLevelEnum' - - type: string - nullable: true - description: |- - The description of who is able to access a given ticket, or where access is inherited from. - - * `COMPANY` - COMPANY - * `PUBLIC` - PUBLIC - * `PRIVATE` - PRIVATE - * `COLLECTION` - COLLECTION - example: PRIVATE - tags: - type: array - items: - type: string - nullable: true - description: The tag's name. - example: - - enterprise - - other-tag - roles: - type: array - items: - type: string - format: uuid - nullable: true - example: - - 21a54124-397f-494d-985e-3c5b330b8a68 - - 17a54124-287f-494d-965e-3c5b330c9a68 - completed_at: - type: string - format: date-time - nullable: true - description: When the ticket was completed. - example: '2021-12-09T00:00:00Z' - ticket_url: - type: string - format: uri - nullable: true - description: The 3rd party url of the Ticket. - maxLength: 2000 - example: https://thirdpartysoftware.com/project/3/issue/1 - priority: - oneOf: - - $ref: '#/components/schemas/PriorityEnum' - - type: string - nullable: true - description: |- - The priority or urgency of the Ticket. - - * `URGENT` - URGENT - * `HIGH` - HIGH - * `NORMAL` - NORMAL - * `LOW` - LOW - example: HIGH - integration_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_integration_field: unique_integration_field_value - linked_account_params: - type: object - additionalProperties: {} - writeOnly: true - nullable: true - example: - unique_linked_account_field: unique_linked_account_field_value - remote_fields: - type: array - items: - $ref: '#/components/schemas/RemoteFieldRequest' - writeOnly: true - x-merge-expands: '{"account": "Account", "assigned_teams": "Team", "assignees": - "User", "attachments": "Attachment", "collections": "Collection", "contact": - "Contact", "creator": "User", "parent_ticket": "Ticket"}' - x-merge-category: ticketing - TicketResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Ticket' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: ticketing - TicketStatusEnum: - enum: - - OPEN - - CLOSED - - IN_PROGRESS - - ON_HOLD - type: string - description: |- - * `OPEN` - OPEN - * `CLOSED` - CLOSED - * `IN_PROGRESS` - IN_PROGRESS - * `ON_HOLD` - ON_HOLD - x-merge-category: ticketing - TicketingAttachmentEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/AttachmentRequest' - required: - - model - x-merge-category: ticketing - TicketingAttachmentResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Attachment' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: ticketing - TicketingContactEndpointRequest: - type: object - properties: - model: - $ref: '#/components/schemas/ContactRequest' - required: - - model - x-merge-category: ticketing - TicketingContactResponse: - type: object - properties: - model: - $ref: '#/components/schemas/Contact' - warnings: - type: array - items: - $ref: '#/components/schemas/WarningValidationProblem' - errors: - type: array - items: - $ref: '#/components/schemas/ErrorValidationProblem' - logs: - type: array - items: - $ref: '#/components/schemas/DebugModeLog' - required: - - errors - - model - - warnings - x-merge-category: ticketing - User: - type: object - description: |- - # The User Object - ### Description - The `User` object is used to represent a user with a login to the ticketing system. - Users are either assignees who are directly responsible or a viewer on a `Ticket`/ `Collection`. - - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '19202938' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - name: - type: string - nullable: true - description: The user's name. - example: Gil Feig - email_address: - type: string - nullable: true - description: The user's email address. - example: help@merge.dev - is_active: - type: boolean - nullable: true - description: Whether or not the user is active. - example: true - teams: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Team' - nullable: true - example: - - 28b54125-287f-494d-965e-3c5b330c9a68 - - 17a54124-287f-494d-965e-3c5b330c9a68 - x-merge-expands-to: Team - roles: - type: array - items: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Role' - nullable: true - example: - - 23454124-387f-494d-265e-345b330c9123 - x-merge-expands-to: Role - avatar: - type: string - nullable: true - description: The user's avatar picture. - example: https://merge.dev/user_profile_pic.png - remote_was_deleted: - type: boolean - readOnly: true - description: Indicates whether or not this object has been deleted in the - third party platform. Full coverage deletion detection is a premium add-on. - Native deletion detection is offered for free with limited coverage. [Learn - more](https://docs.merge.dev/integrations/hris/supported-features/). - field_mappings: - type: object - additionalProperties: {} - nullable: true - readOnly: true - example: - organization_defined_targets: - custom_key: custom_value - linked_account_defined_targets: - custom_key: custom_value - remote_data: - type: array - items: - $ref: '#/components/schemas/RemoteData' - readOnly: true - nullable: true - x-merge-expands: '{"roles": "Role", "teams": "Team"}' - x-merge-category: ticketing - ValidationProblemSource: - type: object - properties: - pointer: - type: string - required: - - pointer - x-merge-category: ticketing - Viewer: - type: object - description: |- - # The Viewer Object - ### Description - The `Viewer` object is used to represent a User or Team within a company. - - ### Usage Example - TODO - properties: - id: - type: string - format: uuid - readOnly: true - example: 17a54124-287f-494d-965e-3c5b330c9a68 - remote_id: - type: string - nullable: true - description: The third-party API ID of the matching object. - example: '088899' - created_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was created by Merge. - example: '2021-09-15T00:00:00Z' - modified_at: - type: string - format: date-time - readOnly: true - description: The datetime that this object was modified by Merge. - example: '2021-10-16T00:00:00Z' - team: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/Team' - nullable: true - description: The Team this Viewer belongs to. - example: 28b54125-287f-494d-965e-3c5b330c9a68 - x-merge-expands-to: Team - user: - oneOf: - - type: string - format: uuid - - $ref: '#/components/schemas/User' - nullable: true - description: The User this Viewer belongs to. - example: 23454124-387f-494d-265e-345b330c9123 - x-merge-expands-to: User - x-merge-expands: '{"team": "Team", "user": "User"}' - x-merge-category: ticketing - WarningValidationProblem: - type: object - properties: - source: - $ref: '#/components/schemas/ValidationProblemSource' - example: - pointer: /age - title: - type: string - example: Unrecognized Field - detail: - type: string - example: An unrecognized field, age, was passed in with request data. - problem_type: - type: string - example: UNRECOGNIZED_FIELD - required: - - detail - - problem_type - - title - x-merge-category: ticketing - WebhookReceiver: - type: object - properties: - event: - type: string - is_active: - type: boolean - key: - type: string - required: - - event - - is_active - x-merge-category: ticketing - WebhookReceiverRequest: - type: object - properties: - event: - type: string - minLength: 1 - is_active: - type: boolean - key: - type: string - minLength: 1 - required: - - event - - is_active - x-merge-category: ticketing - securitySchemes: - tokenAuth: - type: http - scheme: bearer - description: Token-based authentication with required prefix "Bearer" - x-fern-token-variable-name: api_key -servers: -- url: https://api.merge.dev/api/ticketing/v1 - description: Production - x-fern-server-name: Production -- url: https://api-sandbox.merge.dev/api/ticketing/v1 - description: Sandbox - x-fern-server-name: Sandbox -- url: https://api-eu.merge.dev/api/ticketing/v1 - description: Production EU - x-fern-server-name: ProductionEU -- url: https://api-ap.merge.dev/api/ticketing/v1 - description: Production APSE1 - x-fern-server-name: ProductionAPSE1 diff --git a/README.md b/README.md index ce839f993..d32286a5d 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,28 @@ # Merge Java Library [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fmerge-api%2Fmerge-java-client) -[![Maven Central](https://img.shields.io/maven-central/v/dev.merge/merge-java-client)](https://central.sonatype.com/artifact/dev.merge/merge-java-client) The Merge Java library provides convenient access to the Merge APIs from Java. +## Table of Contents + +- [Documentation](#documentation) +- [Installation](#installation) +- [Instantiation](#instantiation) +- [Request Options](#request-options) +- [Usage](#usage) +- [Environments](#environments) +- [Base Url](#base-url) +- [Exception Handling](#exception-handling) +- [Advanced](#advanced) + - [Custom Client](#custom-client) + - [Retries](#retries) + - [Timeouts](#timeouts) + - [Custom Headers](#custom-headers) + - [Access Raw Response Data](#access-raw-response-data) +- [Contributing](#contributing) +- [Reference](#reference) + ## Documentation API documentation is available at [here](https://docs.merge.dev/basics/authentication/). @@ -117,9 +135,9 @@ When the API returns a non-success status code (4xx or 5xx response), an API exc ```java import com.merge.api.core.ApiError; -try { +try{ client.ats().accountDetails().retrieve(...); -} catch (ApiError e) { +} catch (ApiError e){ // Do something with the API exception... } ``` @@ -128,7 +146,7 @@ try { ### Custom Client -This SDK is built to work with any instance of `OkHttpClient`. By default, if no client is provided, the SDK will construct one. +This SDK is built to work with any instance of `OkHttpClient`. By default, if no client is provided, the SDK will construct one. However, you can pass your own client like so: ```java @@ -147,7 +165,9 @@ MergeApiClient client = MergeApiClient The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long as the request is deemed retryable and the number of retry attempts has not grown larger than the configured -retry limit (default: 2). +retry limit (default: 2). Before defaulting to exponential backoff, the SDK will first attempt to respect +the `Retry-After` header (as either in seconds or as an HTTP date), and then the `X-RateLimit-Reset` header +(as a Unix timestamp in epoch seconds); failing both of those, it will fall back to exponential backoff. A request is deemed retryable when any of the following HTTP status codes is returned: @@ -168,8 +188,7 @@ MergeApiClient client = MergeApiClient ### Timeouts -The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level. - +The SDK defaults to a 120 second timeout. You can configure this with a timeout option at the client or request level. ```java import com.merge.api.MergeApiClient; import com.merge.api.core.RequestOptions; @@ -177,7 +196,7 @@ import com.merge.api.core.RequestOptions; // Client level MergeApiClient client = MergeApiClient .builder() - .timeout(10) + .timeout(120) .build(); // Request level @@ -185,7 +204,7 @@ client.ats().accountDetails().retrieve( ..., RequestOptions .builder() - .timeout(10) + .timeout(120) .build() ); ``` @@ -216,6 +235,19 @@ client.ats().accountDetails().retrieve( ); ``` +### Access Raw Response Data + +The SDK provides access to raw response data, including headers, through the `withRawResponse()` method. +The `withRawResponse()` method returns a raw client that wraps all responses with `body()` and `headers()` methods. +(A normal client's `response` is identical to a raw client's `response.body()`.) + +```java +RetrieveHttpResponse response = client.ats().accountDetails().withRawResponse().retrieve(...); + +System.out.println(response.body()); +System.out.println(response.headers().get("X-My-Header")); +``` + ## Contributing While we value open-source contributions to this SDK, this library is generated programmatically. diff --git a/build.gradle b/build.gradle index e1892b052..e52f75438 100644 --- a/build.gradle +++ b/build.gradle @@ -9,19 +9,18 @@ plugins { repositories { mavenCentral() maven { - url 'https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/' + url 'https://oss.sonatype.org/service/local/staging/deploy/maven2/' } } dependencies { - api 'com.squareup.okhttp3:okhttp:4.12.0' - api 'com.fasterxml.jackson.core:jackson-databind:2.17.2' - api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2' - api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2' + api 'com.squareup.okhttp3:okhttp:5.2.1' + api 'com.fasterxml.jackson.core:jackson-databind:2.18.2' + api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.2' + api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2' testImplementation 'org.junit.jupiter:junit-jupiter-params:5.8.2' - testImplementation 'com.squareup.okhttp3:mockwebserver:4.12.0' } @@ -46,23 +45,6 @@ java { } -group = 'dev.merge' - -version = '5.0.1' - -jar { - dependsOn(":generatePomFileForMavenPublication") - archiveBaseName = "merge-java-client" -} - -sourcesJar { - archiveBaseName = "merge-java-client" -} - -javadocJar { - archiveBaseName = "merge-java-client" -} - signing { sign(publishing.publications) } @@ -74,59 +56,3 @@ test { } } -publishing { - publications { - maven(MavenPublication) { - groupId = 'dev.merge' - artifactId = 'merge-java-client' - version = '5.0.1' - from components.java - pom { - name = 'merge' - description = 'The official SDK of merge' - url = 'https://buildwithfern.com' - licenses { - license { - name = 'Custom License (LICENSE)' - } - } - developers { - developer { - name = 'merge' - email = 'developers@merge.com' - } - } - scm { - connection = 'scm:git:git://github.com/merge-api/merge-java-client.git' - developerConnection = 'scm:git:git://github.com/merge-api/merge-java-client.git' - url = 'https://github.com/merge-api/merge-java-client' - } - } - } - } -} - -sonatypeCentralUpload { - username = "$System.env.MAVEN_USERNAME" - password = "$System.env.MAVEN_PASSWORD" - - archives = files( - "$buildDir/libs/merge-java-client-" + version + ".jar", - "$buildDir/libs/merge-java-client-" + version + "-sources.jar", - "$buildDir/libs/merge-java-client-" + version + "-javadoc.jar" - ) - - pom = file("$buildDir/publications/maven/pom-default.xml") - signingKey = "$System.env.MAVEN_SIGNATURE_SECRET_KEY" - signingKeyPassphrase = "$System.env.MAVEN_SIGNATURE_PASSWORD" -} - -signing { - def signingKeyId = "$System.env.MAVEN_SIGNATURE_KID" - def signingKey = "$System.env.MAVEN_SIGNATURE_SECRET_KEY" - def signingPassword = "$System.env.MAVEN_SIGNATURE_PASSWORD" - useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword) - sign publishing.publications.maven -} - -sonatypeCentralUpload.dependsOn build diff --git a/settings.gradle b/settings.gradle index 1721a4b88..aed36fec1 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1 @@ -rootProject.name = 'merge-java-client' - include 'sample-app' \ No newline at end of file diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAccountDetailsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAccountDetailsClient.java index 6c2bc2036..a28670f87 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAccountDetailsClient.java @@ -59,18 +59,16 @@ public CompletableFuture> retrieve(RequestO @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountDetails.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountDetails.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAccountTokenClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAccountTokenClient.java index b5f2c7d7b..e41e2c7f1 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAccountTokenClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAccountTokenClient.java @@ -61,18 +61,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountToken.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountToken.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAccountingPeriodsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAccountingPeriodsClient.java index 66228b3bb..d3efe724c 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAccountingPeriodsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAccountingPeriodsClient.java @@ -103,9 +103,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); AccountingPeriodsListRequest nextRequest = AccountingPeriodsListRequest.builder() .from(request) @@ -127,12 +128,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -197,18 +195,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountingPeriod.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountingPeriod.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAccountsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAccountsClient.java index c497ac2ca..0dbbf4692 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAccountsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAccountsClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -160,9 +158,10 @@ public CompletableFuture>> list @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAccountList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedAccountList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAccountList.class); Optional startingAfter = parsedResponse.getNext(); AccountsListRequest nextRequest = AccountsListRequest.builder() .from(request) @@ -183,12 +182,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -226,12 +222,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -251,18 +245,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -338,17 +330,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Account.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Account.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -393,18 +383,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAddressesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAddressesClient.java index 5e0580b26..b7825154a 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAddressesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAddressesClient.java @@ -88,17 +88,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Address.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Address.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAsyncPassthroughClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAsyncPassthroughClient.java index 98ecea4f7..b6177b082 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAsyncPassthroughClient.java @@ -73,19 +73,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughReciept.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughReciept.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -133,19 +130,17 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughRetrieveResponse.class), + responseBodyString, AsyncPassthroughRetrieveResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAsyncTasksClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAsyncTasksClient.java index e5ff7bb9a..83f45962c 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAsyncTasksClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAsyncTasksClient.java @@ -60,18 +60,16 @@ public CompletableFuture> retrieve(String id @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AsyncPostTask.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPostTask.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAttachmentsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAttachmentsClient.java index eb1302e65..e42c11b49 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAttachmentsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAttachmentsClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -134,9 +132,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); AttachmentsListRequest nextRequest = AttachmentsListRequest.builder() .from(request) @@ -158,12 +157,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -202,12 +198,10 @@ public CompletableFuture> cre QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -227,19 +221,17 @@ public CompletableFuture> cre @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AccountingAttachmentResponse.class), + responseBodyString, AccountingAttachmentResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -304,18 +296,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountingAttachment.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountingAttachment.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -360,18 +350,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAuditTrailClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAuditTrailClient.java index 1fa3cdd82..0605ce9aa 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAuditTrailClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAuditTrailClient.java @@ -99,9 +99,10 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAuditLogEventList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedAuditLogEventList.class); + responseBodyString, PaginatedAuditLogEventList.class); Optional startingAfter = parsedResponse.getNext(); AuditTrailListRequest nextRequest = AuditTrailListRequest.builder() .from(request) @@ -122,12 +123,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAvailableActionsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAvailableActionsClient.java index 066431754..cd6865968 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAvailableActionsClient.java @@ -59,18 +59,16 @@ public CompletableFuture> retrieve(Reques @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AvailableActions.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AvailableActions.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawBalanceSheetsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawBalanceSheetsClient.java index f18b92a6a..88b0b3fb8 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawBalanceSheetsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawBalanceSheetsClient.java @@ -130,9 +130,10 @@ public CompletableFuture>> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedBalanceSheetList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedBalanceSheetList.class); + responseBodyString, PaginatedBalanceSheetList.class); Optional startingAfter = parsedResponse.getNext(); BalanceSheetsListRequest nextRequest = BalanceSheetsListRequest.builder() .from(request) @@ -153,12 +154,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -227,18 +225,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), BalanceSheet.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, BalanceSheet.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawBankFeedAccountsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawBankFeedAccountsClient.java index 74a7b3b90..49da308e1 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawBankFeedAccountsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawBankFeedAccountsClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -109,9 +107,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); BankFeedAccountsListRequest nextRequest = BankFeedAccountsListRequest.builder() .from(request) @@ -133,12 +132,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -177,12 +173,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -202,19 +196,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), BankFeedAccountResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, BankFeedAccountResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -279,18 +270,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), BankFeedAccount.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, BankFeedAccount.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -335,18 +324,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawBankFeedTransactionsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawBankFeedTransactionsClient.java index 7ec0f2dc6..35c069361 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawBankFeedTransactionsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawBankFeedTransactionsClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -138,9 +136,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); BankFeedTransactionsListRequest nextRequest = BankFeedTransactionsListRequest.builder() .from(request) @@ -162,12 +161,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -206,12 +202,10 @@ public CompletableFuture> crea QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -231,19 +225,17 @@ public CompletableFuture> crea @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), BankFeedTransactionResponse.class), + responseBodyString, BankFeedTransactionResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -312,18 +304,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), BankFeedTransaction.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, BankFeedTransaction.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -368,18 +358,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawCashFlowStatementsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawCashFlowStatementsClient.java index 26652d49f..23d7a8ec5 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawCashFlowStatementsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawCashFlowStatementsClient.java @@ -131,9 +131,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); CashFlowStatementsListRequest nextRequest = CashFlowStatementsListRequest.builder() .from(request) @@ -155,12 +156,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -229,18 +227,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CashFlowStatement.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CashFlowStatement.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawCompanyInfoClient.java b/src/main/java/com/merge/api/accounting/AsyncRawCompanyInfoClient.java index 9ce6da5dc..d139b0186 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawCompanyInfoClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawCompanyInfoClient.java @@ -126,9 +126,10 @@ public CompletableFuture>> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedCompanyInfoList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedCompanyInfoList.class); + PaginatedCompanyInfoList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedCompanyInfoList.class); Optional startingAfter = parsedResponse.getNext(); CompanyInfoListRequest nextRequest = CompanyInfoListRequest.builder() .from(request) @@ -149,12 +150,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -223,18 +221,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CompanyInfo.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CompanyInfo.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawContactsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawContactsClient.java index f78a5b65e..8ae80a405 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawContactsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawContactsClient.java @@ -24,9 +24,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -174,9 +172,10 @@ public CompletableFuture>> list @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedContactList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedContactList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedContactList.class); Optional startingAfter = parsedResponse.getNext(); ContactsListRequest nextRequest = ContactsListRequest.builder() .from(request) @@ -197,12 +196,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -240,12 +236,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -265,18 +259,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ContactResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ContactResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -359,17 +351,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Contact.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Contact.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -414,18 +404,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -517,9 +504,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); ContactsRemoteFieldClassesListRequest nextRequest = ContactsRemoteFieldClassesListRequest.builder() @@ -542,12 +530,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawCreditNotesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawCreditNotesClient.java index e68488516..61d9d1540 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawCreditNotesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawCreditNotesClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -159,9 +157,10 @@ public CompletableFuture>> l @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedCreditNoteList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedCreditNoteList.class); + PaginatedCreditNoteList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedCreditNoteList.class); Optional startingAfter = parsedResponse.getNext(); CreditNotesListRequest nextRequest = CreditNotesListRequest.builder() .from(request) @@ -182,12 +181,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -225,12 +221,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -250,18 +244,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CreditNoteResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CreditNoteResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -337,18 +329,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CreditNote.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CreditNote.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -393,18 +382,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawDeleteAccountClient.java b/src/main/java/com/merge/api/accounting/AsyncRawDeleteAccountClient.java index 90b7ddd2c..542d438ef 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawDeleteAccountClient.java @@ -63,11 +63,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO return; } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawEmployeesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawEmployeesClient.java index e8274e409..f4630f4ca 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawEmployeesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawEmployeesClient.java @@ -105,9 +105,10 @@ public CompletableFuture>> lis @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedEmployeeList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedEmployeeList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedEmployeeList.class); Optional startingAfter = parsedResponse.getNext(); EmployeesListRequest nextRequest = EmployeesListRequest.builder() .from(request) @@ -128,12 +129,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -201,17 +199,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Employee.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Employee.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawExpensesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawExpensesClient.java index a7cb5375a..c5bf98728 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawExpensesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawExpensesClient.java @@ -25,9 +25,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -161,9 +159,10 @@ public CompletableFuture>> list @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedExpenseList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedExpenseList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedExpenseList.class); Optional startingAfter = parsedResponse.getNext(); ExpensesListRequest nextRequest = ExpensesListRequest.builder() .from(request) @@ -184,12 +183,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -227,12 +223,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -252,18 +246,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ExpenseResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ExpenseResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -338,17 +330,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Expense.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Expense.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -440,9 +430,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); ExpensesLinesRemoteFieldClassesListRequest nextRequest = ExpensesLinesRemoteFieldClassesListRequest.builder() @@ -465,12 +456,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -515,18 +503,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -618,9 +603,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); ExpensesRemoteFieldClassesListRequest nextRequest = ExpensesRemoteFieldClassesListRequest.builder() @@ -643,12 +629,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawFieldMappingClient.java b/src/main/java/com/merge/api/accounting/AsyncRawFieldMappingClient.java index a873b31ca..4f9592415 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawFieldMappingClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawFieldMappingClient.java @@ -21,8 +21,6 @@ import com.merge.api.core.QueryStringMapper; import com.merge.api.core.RequestOptions; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -87,19 +85,17 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingApiInstanceResponse.class), + responseBodyString, FieldMappingApiInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -137,17 +133,10 @@ public CompletableFuture> fie request.getExcludeRemoteFieldMetadata().get(), false); } - Map properties = new HashMap<>(); - properties.put("target_field_name", request.getTargetFieldName()); - properties.put("target_field_description", request.getTargetFieldDescription()); - properties.put("remote_field_traversal_path", request.getRemoteFieldTraversalPath()); - properties.put("remote_method", request.getRemoteMethod()); - properties.put("remote_url_path", request.getRemoteUrlPath()); - properties.put("common_model_name", request.getCommonModelName()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -167,19 +156,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -227,19 +214,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -304,19 +289,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -380,19 +363,16 @@ public CompletableFuture> remoteFie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), RemoteFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteFieldApiResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -438,19 +418,17 @@ public CompletableFuture> t @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), ExternalTargetFieldApiResponse.class), + responseBodyString, ExternalTargetFieldApiResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawForceResyncClient.java b/src/main/java/com/merge/api/accounting/AsyncRawForceResyncClient.java index e2576117c..aed5a78f5 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawForceResyncClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawForceResyncClient.java @@ -63,19 +63,17 @@ public CompletableFuture>> syncStatusResyn @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawGeneralLedgerTransactionsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawGeneralLedgerTransactionsClient.java index 45f7d2f92..f01ece0d9 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawGeneralLedgerTransactionsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawGeneralLedgerTransactionsClient.java @@ -139,9 +139,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); GeneralLedgerTransactionsListRequest nextRequest = GeneralLedgerTransactionsListRequest.builder() @@ -164,12 +165,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -238,19 +236,16 @@ public CompletableFuture> retriev @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), GeneralLedgerTransaction.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GeneralLedgerTransaction.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawGenerateKeyClient.java b/src/main/java/com/merge/api/accounting/AsyncRawGenerateKeyClient.java index b6d70b6be..7cfbda1e6 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawGenerateKeyClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawIncomeStatementsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawIncomeStatementsClient.java index 901856583..032fb3850 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawIncomeStatementsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawIncomeStatementsClient.java @@ -130,9 +130,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); IncomeStatementsListRequest nextRequest = IncomeStatementsListRequest.builder() .from(request) @@ -154,12 +155,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -228,18 +226,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), IncomeStatement.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, IncomeStatement.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawInvoicesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawInvoicesClient.java index a58033264..455c0c11b 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawInvoicesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawInvoicesClient.java @@ -26,9 +26,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -180,9 +178,10 @@ public CompletableFuture>> list @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedInvoiceList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedInvoiceList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedInvoiceList.class); Optional startingAfter = parsedResponse.getNext(); InvoicesListRequest nextRequest = InvoicesListRequest.builder() .from(request) @@ -203,12 +202,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -248,12 +244,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -273,18 +267,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), InvoiceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, InvoiceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -367,17 +359,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Invoice.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Invoice.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -417,12 +407,10 @@ public CompletableFuture> partialUpdate( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -442,18 +430,16 @@ public CompletableFuture> partialUpdate( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), InvoiceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, InvoiceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -547,9 +533,10 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedRemoteFieldClassList.class); + responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); InvoicesLineItemsRemoteFieldClassesListRequest nextRequest = InvoicesLineItemsRemoteFieldClassesListRequest.builder() @@ -572,12 +559,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -624,18 +608,15 @@ public CompletableFuture> metaPatchRetrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -680,18 +661,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -783,9 +761,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); InvoicesRemoteFieldClassesListRequest nextRequest = InvoicesRemoteFieldClassesListRequest.builder() @@ -808,12 +787,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawIssuesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawIssuesClient.java index 425fdf966..a03918b65 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawIssuesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawIssuesClient.java @@ -145,9 +145,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedIssueList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedIssueList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedIssueList.class); Optional startingAfter = parsedResponse.getNext(); IssuesListRequest nextRequest = IssuesListRequest.builder() .from(request) @@ -167,12 +168,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -218,17 +216,15 @@ public CompletableFuture> retrieve(String id, Reques @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Issue.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Issue.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawItemsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawItemsClient.java index f9d7934ce..27ce15a97 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawItemsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawItemsClient.java @@ -22,9 +22,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -145,9 +143,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedItemList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedItemList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedItemList.class); Optional startingAfter = parsedResponse.getNext(); ItemsListRequest nextRequest = ItemsListRequest.builder() .from(request) @@ -167,12 +166,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -210,12 +206,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -235,18 +229,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ItemResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ItemResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -322,17 +313,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Item.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Item.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -372,12 +361,10 @@ public CompletableFuture> partialUpdate( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -397,18 +384,15 @@ public CompletableFuture> partialUpdate( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ItemResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ItemResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -455,18 +439,15 @@ public CompletableFuture> metaPatchRetrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -511,18 +492,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawJournalEntriesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawJournalEntriesClient.java index 9687e9388..716805cbf 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawJournalEntriesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawJournalEntriesClient.java @@ -25,9 +25,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -162,9 +160,10 @@ public CompletableFuture>> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedJournalEntryList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedJournalEntryList.class); + responseBodyString, PaginatedJournalEntryList.class); Optional startingAfter = parsedResponse.getNext(); JournalEntriesListRequest nextRequest = JournalEntriesListRequest.builder() .from(request) @@ -185,12 +184,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -228,12 +224,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -253,18 +247,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), JournalEntryResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, JournalEntryResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -340,18 +332,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), JournalEntry.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, JournalEntry.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -443,9 +432,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); JournalEntriesLinesRemoteFieldClassesListRequest nextRequest = JournalEntriesLinesRemoteFieldClassesListRequest.builder() @@ -468,12 +458,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -518,18 +505,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -621,9 +605,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); JournalEntriesRemoteFieldClassesListRequest nextRequest = JournalEntriesRemoteFieldClassesListRequest.builder() @@ -646,12 +631,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawLinkTokenClient.java b/src/main/java/com/merge/api/accounting/AsyncRawLinkTokenClient.java index 18417db65..f56c31333 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawLinkTokenClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawLinkTokenClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), LinkToken.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, LinkToken.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawLinkedAccountsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawLinkedAccountsClient.java index 5dc571861..0bb060275 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawLinkedAccountsClient.java @@ -138,9 +138,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); LinkedAccountsListRequest nextRequest = LinkedAccountsListRequest.builder() .from(request) @@ -162,12 +163,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawPassthroughClient.java b/src/main/java/com/merge/api/accounting/AsyncRawPassthroughClient.java index 02c8a827e..03fef8db0 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawPassthroughClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawPassthroughClient.java @@ -72,18 +72,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawPaymentMethodsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawPaymentMethodsClient.java index 462cf91f6..a3b6331bb 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawPaymentMethodsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawPaymentMethodsClient.java @@ -102,9 +102,10 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedPaymentMethodList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedPaymentMethodList.class); + responseBodyString, PaginatedPaymentMethodList.class); Optional startingAfter = parsedResponse.getNext(); PaymentMethodsListRequest nextRequest = PaymentMethodsListRequest.builder() .from(request) @@ -125,12 +126,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -195,18 +193,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaymentMethod.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaymentMethod.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawPaymentTermsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawPaymentTermsClient.java index 5b150f6c6..1af1a1e4b 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawPaymentTermsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawPaymentTermsClient.java @@ -106,9 +106,10 @@ public CompletableFuture>> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedPaymentTermList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedPaymentTermList.class); + PaginatedPaymentTermList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedPaymentTermList.class); Optional startingAfter = parsedResponse.getNext(); PaymentTermsListRequest nextRequest = PaymentTermsListRequest.builder() .from(request) @@ -129,12 +130,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -203,18 +201,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaymentTerm.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaymentTerm.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawPaymentsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawPaymentsClient.java index 68efcb630..ed5e7b039 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawPaymentsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawPaymentsClient.java @@ -26,9 +26,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -170,9 +168,10 @@ public CompletableFuture>> list @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedPaymentList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedPaymentList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedPaymentList.class); Optional startingAfter = parsedResponse.getNext(); PaymentsListRequest nextRequest = PaymentsListRequest.builder() .from(request) @@ -193,12 +192,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -236,12 +232,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -261,18 +255,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaymentResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaymentResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -347,17 +339,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Payment.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Payment.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -397,12 +387,10 @@ public CompletableFuture> partialUpdate( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -422,18 +410,16 @@ public CompletableFuture> partialUpdate( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaymentResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaymentResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -527,9 +513,10 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedRemoteFieldClassList.class); + responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); PaymentsLineItemsRemoteFieldClassesListRequest nextRequest = PaymentsLineItemsRemoteFieldClassesListRequest.builder() @@ -552,12 +539,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -604,18 +588,15 @@ public CompletableFuture> metaPatchRetrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -660,18 +641,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -763,9 +741,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); PaymentsRemoteFieldClassesListRequest nextRequest = PaymentsRemoteFieldClassesListRequest.builder() @@ -788,12 +767,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawPhoneNumbersClient.java b/src/main/java/com/merge/api/accounting/AsyncRawPhoneNumbersClient.java index a14059b24..3ca386168 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawPhoneNumbersClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawPhoneNumbersClient.java @@ -81,18 +81,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountingPhoneNumber.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountingPhoneNumber.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawProjectsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawProjectsClient.java index 9d5514d9b..e3fc1e7ca 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawProjectsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawProjectsClient.java @@ -100,18 +100,16 @@ public CompletableFuture> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedProjectList.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedProjectList.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -179,17 +177,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Project.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Project.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawPurchaseOrdersClient.java b/src/main/java/com/merge/api/accounting/AsyncRawPurchaseOrdersClient.java index 717f741e6..0a32a0f11 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawPurchaseOrdersClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawPurchaseOrdersClient.java @@ -25,9 +25,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -164,9 +162,10 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedPurchaseOrderList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedPurchaseOrderList.class); + responseBodyString, PaginatedPurchaseOrderList.class); Optional startingAfter = parsedResponse.getNext(); PurchaseOrdersListRequest nextRequest = PurchaseOrdersListRequest.builder() .from(request) @@ -187,12 +186,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -230,12 +226,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -255,18 +249,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PurchaseOrderResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PurchaseOrderResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -350,18 +342,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PurchaseOrder.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PurchaseOrder.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -455,9 +445,10 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedRemoteFieldClassList.class); + responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); PurchaseOrdersLineItemsRemoteFieldClassesListRequest nextRequest = PurchaseOrdersLineItemsRemoteFieldClassesListRequest.builder() @@ -480,12 +471,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -530,18 +518,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -633,9 +618,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); PurchaseOrdersRemoteFieldClassesListRequest nextRequest = PurchaseOrdersRemoteFieldClassesListRequest.builder() @@ -658,12 +644,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawRegenerateKeyClient.java b/src/main/java/com/merge/api/accounting/AsyncRawRegenerateKeyClient.java index e416d992f..a9c297033 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawRegenerateKeyClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawScopesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawScopesClient.java index ee3a59fe2..496b5e5b8 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawScopesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawScopesClient.java @@ -64,18 +64,16 @@ public CompletableFuture> defaultScope @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -121,18 +119,16 @@ public CompletableFuture> linkedAccoun @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -187,18 +183,16 @@ public CompletableFuture> linkedAccoun @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawSyncStatusClient.java b/src/main/java/com/merge/api/accounting/AsyncRawSyncStatusClient.java index 9eeeac6a1..cfdff1456 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawSyncStatusClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawSyncStatusClient.java @@ -82,9 +82,10 @@ public CompletableFuture>> l @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedSyncStatusList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedSyncStatusList.class); + PaginatedSyncStatusList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedSyncStatusList.class); Optional startingAfter = parsedResponse.getNext(); SyncStatusListRequest nextRequest = SyncStatusListRequest.builder() .from(request) @@ -105,12 +106,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawTaxRatesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawTaxRatesClient.java index b6f169e8a..1b5295c29 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawTaxRatesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawTaxRatesClient.java @@ -133,9 +133,10 @@ public CompletableFuture>> list @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTaxRateList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTaxRateList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTaxRateList.class); Optional startingAfter = parsedResponse.getNext(); TaxRatesListRequest nextRequest = TaxRatesListRequest.builder() .from(request) @@ -156,12 +157,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -229,17 +227,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TaxRate.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TaxRate.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawTrackingCategoriesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawTrackingCategoriesClient.java index bcc6c1202..444385f08 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawTrackingCategoriesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawTrackingCategoriesClient.java @@ -151,9 +151,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); TrackingCategoriesListRequest nextRequest = TrackingCategoriesListRequest.builder() .from(request) @@ -175,12 +176,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -257,18 +255,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TrackingCategory.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TrackingCategory.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawTransactionsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawTransactionsClient.java index 989497df2..a3963ad4f 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawTransactionsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawTransactionsClient.java @@ -144,9 +144,10 @@ public CompletableFuture>> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedTransactionList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedTransactionList.class); + PaginatedTransactionList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTransactionList.class); Optional startingAfter = parsedResponse.getNext(); TransactionsListRequest nextRequest = TransactionsListRequest.builder() .from(request) @@ -167,12 +168,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -241,18 +239,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Transaction.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Transaction.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawVendorCreditsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawVendorCreditsClient.java index e8c3921e9..dce9f0c2b 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawVendorCreditsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawVendorCreditsClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -151,9 +149,10 @@ public CompletableFuture>> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedVendorCreditList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedVendorCreditList.class); + responseBodyString, PaginatedVendorCreditList.class); Optional startingAfter = parsedResponse.getNext(); VendorCreditsListRequest nextRequest = VendorCreditsListRequest.builder() .from(request) @@ -174,12 +173,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -217,12 +213,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -242,18 +236,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), VendorCreditResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, VendorCreditResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -322,18 +314,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), VendorCredit.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, VendorCredit.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -378,18 +367,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawWebhookReceiversClient.java b/src/main/java/com/merge/api/accounting/AsyncRawWebhookReceiversClient.java index 587d0de91..94c387861 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawWebhookReceiversClient.java @@ -65,19 +65,17 @@ public CompletableFuture>> list(Reque @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -131,18 +129,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), WebhookReceiver.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, WebhookReceiver.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/accounting/RawAccountDetailsClient.java b/src/main/java/com/merge/api/accounting/RawAccountDetailsClient.java index 5ad592d7a..0a890b5e6 100644 --- a/src/main/java/com/merge/api/accounting/RawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/accounting/RawAccountDetailsClient.java @@ -52,16 +52,13 @@ public MergeApiHttpResponse retrieve(RequestOptions requestOptio } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountDetails.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountDetails.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawAccountTokenClient.java b/src/main/java/com/merge/api/accounting/RawAccountTokenClient.java index 7dded342b..818ecc1e0 100644 --- a/src/main/java/com/merge/api/accounting/RawAccountTokenClient.java +++ b/src/main/java/com/merge/api/accounting/RawAccountTokenClient.java @@ -53,16 +53,13 @@ public MergeApiHttpResponse retrieve(String publicToken, RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountToken.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountToken.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawAccountingPeriodsClient.java b/src/main/java/com/merge/api/accounting/RawAccountingPeriodsClient.java index 08c269138..638793c66 100644 --- a/src/main/java/com/merge/api/accounting/RawAccountingPeriodsClient.java +++ b/src/main/java/com/merge/api/accounting/RawAccountingPeriodsClient.java @@ -93,9 +93,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAccountingPeriodList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedAccountingPeriodList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAccountingPeriodList.class); Optional startingAfter = parsedResponse.getNext(); AccountingPeriodsListRequest nextRequest = AccountingPeriodsListRequest.builder() .from(request) @@ -109,12 +110,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -166,16 +163,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountingPeriod.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountingPeriod.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawAccountsClient.java b/src/main/java/com/merge/api/accounting/RawAccountsClient.java index c700c8e6b..6a48d30c2 100644 --- a/src/main/java/com/merge/api/accounting/RawAccountsClient.java +++ b/src/main/java/com/merge/api/accounting/RawAccountsClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -152,9 +150,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAccountList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedAccountList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAccountList.class); Optional startingAfter = parsedResponse.getNext(); AccountsListRequest nextRequest = AccountsListRequest.builder() .from(request) @@ -167,12 +166,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -200,12 +195,10 @@ public MergeApiHttpResponse create(AccountEndpointRequest reque QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -222,16 +215,13 @@ public MergeApiHttpResponse create(AccountEndpointRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -295,16 +285,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Account.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Account.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -337,16 +324,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawAddressesClient.java b/src/main/java/com/merge/api/accounting/RawAddressesClient.java index 429833e3c..abd177d0f 100644 --- a/src/main/java/com/merge/api/accounting/RawAddressesClient.java +++ b/src/main/java/com/merge/api/accounting/RawAddressesClient.java @@ -81,16 +81,13 @@ public MergeApiHttpResponse
retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Address.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Address.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawAsyncPassthroughClient.java b/src/main/java/com/merge/api/accounting/RawAsyncPassthroughClient.java index 1ffe54009..1be7d63fa 100644 --- a/src/main/java/com/merge/api/accounting/RawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/accounting/RawAsyncPassthroughClient.java @@ -66,17 +66,14 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AsyncPassthroughReciept.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughReciept.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -111,18 +108,14 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughRetrieveResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughRetrieveResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawAsyncTasksClient.java b/src/main/java/com/merge/api/accounting/RawAsyncTasksClient.java index 9ce1438cb..68efa0f62 100644 --- a/src/main/java/com/merge/api/accounting/RawAsyncTasksClient.java +++ b/src/main/java/com/merge/api/accounting/RawAsyncTasksClient.java @@ -53,16 +53,13 @@ public MergeApiHttpResponse retrieve(String id, RequestOptions re } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AsyncPostTask.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPostTask.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawAttachmentsClient.java b/src/main/java/com/merge/api/accounting/RawAttachmentsClient.java index 95c6eb727..5e3fc4beb 100644 --- a/src/main/java/com/merge/api/accounting/RawAttachmentsClient.java +++ b/src/main/java/com/merge/api/accounting/RawAttachmentsClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -124,9 +122,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAccountingAttachmentList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedAccountingAttachmentList.class); + responseBodyString, PaginatedAccountingAttachmentList.class); Optional startingAfter = parsedResponse.getNext(); AttachmentsListRequest nextRequest = AttachmentsListRequest.builder() .from(request) @@ -140,12 +139,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -174,12 +169,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -196,17 +189,14 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountingAttachmentResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountingAttachmentResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -258,17 +248,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountingAttachment.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountingAttachment.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -301,16 +287,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawAuditTrailClient.java b/src/main/java/com/merge/api/accounting/RawAuditTrailClient.java index bbbb6d837..624c49aee 100644 --- a/src/main/java/com/merge/api/accounting/RawAuditTrailClient.java +++ b/src/main/java/com/merge/api/accounting/RawAuditTrailClient.java @@ -90,9 +90,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAuditLogEventList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedAuditLogEventList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAuditLogEventList.class); Optional startingAfter = parsedResponse.getNext(); AuditTrailListRequest nextRequest = AuditTrailListRequest.builder() .from(request) @@ -106,12 +107,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawAvailableActionsClient.java b/src/main/java/com/merge/api/accounting/RawAvailableActionsClient.java index d8274f2bf..40745a8ff 100644 --- a/src/main/java/com/merge/api/accounting/RawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/accounting/RawAvailableActionsClient.java @@ -52,16 +52,13 @@ public MergeApiHttpResponse retrieve(RequestOptions requestOpt } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AvailableActions.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AvailableActions.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawBalanceSheetsClient.java b/src/main/java/com/merge/api/accounting/RawBalanceSheetsClient.java index e83b623c9..6c7c1dfee 100644 --- a/src/main/java/com/merge/api/accounting/RawBalanceSheetsClient.java +++ b/src/main/java/com/merge/api/accounting/RawBalanceSheetsClient.java @@ -121,9 +121,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedBalanceSheetList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedBalanceSheetList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedBalanceSheetList.class); Optional startingAfter = parsedResponse.getNext(); BalanceSheetsListRequest nextRequest = BalanceSheetsListRequest.builder() .from(request) @@ -137,12 +138,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -198,16 +195,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), BalanceSheet.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, BalanceSheet.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawBankFeedAccountsClient.java b/src/main/java/com/merge/api/accounting/RawBankFeedAccountsClient.java index e4b49fdd2..e6e16a685 100644 --- a/src/main/java/com/merge/api/accounting/RawBankFeedAccountsClient.java +++ b/src/main/java/com/merge/api/accounting/RawBankFeedAccountsClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -100,9 +98,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedBankFeedAccountList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedBankFeedAccountList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedBankFeedAccountList.class); Optional startingAfter = parsedResponse.getNext(); BankFeedAccountsListRequest nextRequest = BankFeedAccountsListRequest.builder() .from(request) @@ -116,12 +115,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -150,12 +145,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -172,17 +165,14 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), BankFeedAccountResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, BankFeedAccountResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -234,16 +224,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), BankFeedAccount.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, BankFeedAccount.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -276,16 +263,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawBankFeedTransactionsClient.java b/src/main/java/com/merge/api/accounting/RawBankFeedTransactionsClient.java index 5047c6487..9757eaf98 100644 --- a/src/main/java/com/merge/api/accounting/RawBankFeedTransactionsClient.java +++ b/src/main/java/com/merge/api/accounting/RawBankFeedTransactionsClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -128,9 +126,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedBankFeedTransactionList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedBankFeedTransactionList.class); + PaginatedBankFeedTransactionList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedBankFeedTransactionList.class); Optional startingAfter = parsedResponse.getNext(); BankFeedTransactionsListRequest nextRequest = BankFeedTransactionsListRequest.builder() .from(request) @@ -144,12 +143,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -178,12 +173,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -200,17 +193,14 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), BankFeedTransactionResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, BankFeedTransactionResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -266,17 +256,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), BankFeedTransaction.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, BankFeedTransaction.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -309,16 +295,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawCashFlowStatementsClient.java b/src/main/java/com/merge/api/accounting/RawCashFlowStatementsClient.java index 34cdc0093..5c213cabd 100644 --- a/src/main/java/com/merge/api/accounting/RawCashFlowStatementsClient.java +++ b/src/main/java/com/merge/api/accounting/RawCashFlowStatementsClient.java @@ -121,9 +121,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedCashFlowStatementList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedCashFlowStatementList.class); + PaginatedCashFlowStatementList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedCashFlowStatementList.class); Optional startingAfter = parsedResponse.getNext(); CashFlowStatementsListRequest nextRequest = CashFlowStatementsListRequest.builder() .from(request) @@ -137,12 +138,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -198,16 +195,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CashFlowStatement.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CashFlowStatement.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawCompanyInfoClient.java b/src/main/java/com/merge/api/accounting/RawCompanyInfoClient.java index 78dc80cda..20e273f32 100644 --- a/src/main/java/com/merge/api/accounting/RawCompanyInfoClient.java +++ b/src/main/java/com/merge/api/accounting/RawCompanyInfoClient.java @@ -117,9 +117,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedCompanyInfoList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedCompanyInfoList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedCompanyInfoList.class); Optional startingAfter = parsedResponse.getNext(); CompanyInfoListRequest nextRequest = CompanyInfoListRequest.builder() .from(request) @@ -133,12 +134,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -194,16 +191,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CompanyInfo.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CompanyInfo.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawContactsClient.java b/src/main/java/com/merge/api/accounting/RawContactsClient.java index 1d273fd3e..7dd568365 100644 --- a/src/main/java/com/merge/api/accounting/RawContactsClient.java +++ b/src/main/java/com/merge/api/accounting/RawContactsClient.java @@ -24,9 +24,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -166,9 +164,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedContactList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedContactList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedContactList.class); Optional startingAfter = parsedResponse.getNext(); ContactsListRequest nextRequest = ContactsListRequest.builder() .from(request) @@ -181,12 +180,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -214,12 +209,10 @@ public MergeApiHttpResponse create(ContactEndpointRequest reque QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -236,16 +229,13 @@ public MergeApiHttpResponse create(ContactEndpointRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ContactResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ContactResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -316,16 +306,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Contact.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Contact.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -358,16 +345,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -446,9 +430,10 @@ public MergeApiHttpResponse> remoteFieldCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); ContactsRemoteFieldClassesListRequest nextRequest = ContactsRemoteFieldClassesListRequest.builder() .from(request) @@ -462,12 +447,8 @@ public MergeApiHttpResponse> remoteFieldCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawCreditNotesClient.java b/src/main/java/com/merge/api/accounting/RawCreditNotesClient.java index a5dda9f34..093ca17d2 100644 --- a/src/main/java/com/merge/api/accounting/RawCreditNotesClient.java +++ b/src/main/java/com/merge/api/accounting/RawCreditNotesClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -150,9 +148,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedCreditNoteList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedCreditNoteList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedCreditNoteList.class); Optional startingAfter = parsedResponse.getNext(); CreditNotesListRequest nextRequest = CreditNotesListRequest.builder() .from(request) @@ -166,12 +165,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -200,12 +195,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -222,16 +215,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CreditNoteResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CreditNoteResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -295,16 +285,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CreditNote.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CreditNote.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -337,16 +324,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawDeleteAccountClient.java b/src/main/java/com/merge/api/accounting/RawDeleteAccountClient.java index 79cd314e5..346d39e75 100644 --- a/src/main/java/com/merge/api/accounting/RawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/accounting/RawDeleteAccountClient.java @@ -55,11 +55,8 @@ public MergeApiHttpResponse delete(RequestOptions requestOptions) { return new MergeApiHttpResponse<>(null, response); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawEmployeesClient.java b/src/main/java/com/merge/api/accounting/RawEmployeesClient.java index c4a2f287b..2647115c7 100644 --- a/src/main/java/com/merge/api/accounting/RawEmployeesClient.java +++ b/src/main/java/com/merge/api/accounting/RawEmployeesClient.java @@ -97,9 +97,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedEmployeeList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedEmployeeList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedEmployeeList.class); Optional startingAfter = parsedResponse.getNext(); EmployeesListRequest nextRequest = EmployeesListRequest.builder() .from(request) @@ -112,12 +113,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -173,16 +170,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Employee.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Employee.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawExpensesClient.java b/src/main/java/com/merge/api/accounting/RawExpensesClient.java index e23eae6fb..3a05f36e1 100644 --- a/src/main/java/com/merge/api/accounting/RawExpensesClient.java +++ b/src/main/java/com/merge/api/accounting/RawExpensesClient.java @@ -25,9 +25,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -153,9 +151,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedExpenseList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedExpenseList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedExpenseList.class); Optional startingAfter = parsedResponse.getNext(); ExpensesListRequest nextRequest = ExpensesListRequest.builder() .from(request) @@ -168,12 +167,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -201,12 +196,10 @@ public MergeApiHttpResponse create(ExpenseEndpointRequest reque QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -223,16 +216,13 @@ public MergeApiHttpResponse create(ExpenseEndpointRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ExpenseResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ExpenseResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -295,16 +285,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Expense.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Expense.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -383,9 +370,10 @@ public MergeApiHttpResponse> linesRemoteFie } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); ExpensesLinesRemoteFieldClassesListRequest nextRequest = ExpensesLinesRemoteFieldClassesListRequest.builder() @@ -400,12 +388,8 @@ public MergeApiHttpResponse> linesRemoteFie .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -438,16 +422,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -526,9 +507,10 @@ public MergeApiHttpResponse> remoteFieldCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); ExpensesRemoteFieldClassesListRequest nextRequest = ExpensesRemoteFieldClassesListRequest.builder() .from(request) @@ -542,12 +524,8 @@ public MergeApiHttpResponse> remoteFieldCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawFieldMappingClient.java b/src/main/java/com/merge/api/accounting/RawFieldMappingClient.java index 008716ff4..309bc9651 100644 --- a/src/main/java/com/merge/api/accounting/RawFieldMappingClient.java +++ b/src/main/java/com/merge/api/accounting/RawFieldMappingClient.java @@ -21,8 +21,6 @@ import com.merge.api.core.QueryStringMapper; import com.merge.api.core.RequestOptions; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -80,18 +78,14 @@ public MergeApiHttpResponse fieldMappingsRetrie } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingApiInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingApiInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -119,17 +113,10 @@ public MergeApiHttpResponse fieldMappingsCreate( request.getExcludeRemoteFieldMetadata().get(), false); } - Map properties = new HashMap<>(); - properties.put("target_field_name", request.getTargetFieldName()); - properties.put("target_field_description", request.getTargetFieldDescription()); - properties.put("remote_field_traversal_path", request.getRemoteFieldTraversalPath()); - properties.put("remote_method", request.getRemoteMethod()); - properties.put("remote_url_path", request.getRemoteUrlPath()); - properties.put("common_model_name", request.getCommonModelName()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -146,17 +133,14 @@ public MergeApiHttpResponse fieldMappingsCreate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -191,17 +175,14 @@ public MergeApiHttpResponse fieldMappingsDestroy( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -253,17 +234,14 @@ public MergeApiHttpResponse fieldMappingsPartialUp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -314,17 +292,14 @@ public MergeApiHttpResponse remoteFieldsRetrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteFieldApiResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -357,18 +332,14 @@ public MergeApiHttpResponse targetFieldsRetrieve } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), ExternalTargetFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ExternalTargetFieldApiResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawForceResyncClient.java b/src/main/java/com/merge/api/accounting/RawForceResyncClient.java index fca1bd5ad..20f1f18a8 100644 --- a/src/main/java/com/merge/api/accounting/RawForceResyncClient.java +++ b/src/main/java/com/merge/api/accounting/RawForceResyncClient.java @@ -55,18 +55,15 @@ public MergeApiHttpResponse> syncStatusResyncCreate(RequestOpti } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawGeneralLedgerTransactionsClient.java b/src/main/java/com/merge/api/accounting/RawGeneralLedgerTransactionsClient.java index 976c4fc1b..dcd92aa4b 100644 --- a/src/main/java/com/merge/api/accounting/RawGeneralLedgerTransactionsClient.java +++ b/src/main/java/com/merge/api/accounting/RawGeneralLedgerTransactionsClient.java @@ -130,9 +130,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedGeneralLedgerTransactionList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedGeneralLedgerTransactionList.class); + responseBodyString, PaginatedGeneralLedgerTransactionList.class); Optional startingAfter = parsedResponse.getNext(); GeneralLedgerTransactionsListRequest nextRequest = GeneralLedgerTransactionsListRequest.builder() .from(request) @@ -147,12 +148,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -209,17 +206,14 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), GeneralLedgerTransaction.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GeneralLedgerTransaction.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawGenerateKeyClient.java b/src/main/java/com/merge/api/accounting/RawGenerateKeyClient.java index badbd11f9..11896f7f1 100644 --- a/src/main/java/com/merge/api/accounting/RawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/accounting/RawGenerateKeyClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request, } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawIncomeStatementsClient.java b/src/main/java/com/merge/api/accounting/RawIncomeStatementsClient.java index b02be95f5..3aef69bdd 100644 --- a/src/main/java/com/merge/api/accounting/RawIncomeStatementsClient.java +++ b/src/main/java/com/merge/api/accounting/RawIncomeStatementsClient.java @@ -121,9 +121,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedIncomeStatementList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedIncomeStatementList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedIncomeStatementList.class); Optional startingAfter = parsedResponse.getNext(); IncomeStatementsListRequest nextRequest = IncomeStatementsListRequest.builder() .from(request) @@ -137,12 +138,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -198,16 +195,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), IncomeStatement.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, IncomeStatement.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawInvoicesClient.java b/src/main/java/com/merge/api/accounting/RawInvoicesClient.java index 53fb1ed32..d3545950a 100644 --- a/src/main/java/com/merge/api/accounting/RawInvoicesClient.java +++ b/src/main/java/com/merge/api/accounting/RawInvoicesClient.java @@ -26,9 +26,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -172,9 +170,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedInvoiceList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedInvoiceList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedInvoiceList.class); Optional startingAfter = parsedResponse.getNext(); InvoicesListRequest nextRequest = InvoicesListRequest.builder() .from(request) @@ -187,12 +186,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -222,12 +217,10 @@ public MergeApiHttpResponse create(InvoiceEndpointRequest reque QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -244,16 +237,13 @@ public MergeApiHttpResponse create(InvoiceEndpointRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), InvoiceResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, InvoiceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -324,16 +314,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Invoice.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Invoice.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -363,12 +350,10 @@ public MergeApiHttpResponse partialUpdate( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -385,16 +370,13 @@ public MergeApiHttpResponse partialUpdate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), InvoiceResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, InvoiceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -473,9 +455,10 @@ public MergeApiHttpResponse> lineItemsRemot } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); InvoicesLineItemsRemoteFieldClassesListRequest nextRequest = InvoicesLineItemsRemoteFieldClassesListRequest.builder() @@ -492,12 +475,8 @@ public MergeApiHttpResponse> lineItemsRemot .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -531,16 +510,13 @@ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -573,16 +549,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -661,9 +634,10 @@ public MergeApiHttpResponse> remoteFieldCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); InvoicesRemoteFieldClassesListRequest nextRequest = InvoicesRemoteFieldClassesListRequest.builder() .from(request) @@ -677,12 +651,8 @@ public MergeApiHttpResponse> remoteFieldCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawIssuesClient.java b/src/main/java/com/merge/api/accounting/RawIssuesClient.java index dd539b014..0024d8c90 100644 --- a/src/main/java/com/merge/api/accounting/RawIssuesClient.java +++ b/src/main/java/com/merge/api/accounting/RawIssuesClient.java @@ -137,9 +137,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedIssueList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedIssueList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedIssueList.class); Optional startingAfter = parsedResponse.getNext(); IssuesListRequest nextRequest = IssuesListRequest.builder() .from(request) @@ -152,12 +153,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -191,16 +188,13 @@ public MergeApiHttpResponse retrieve(String id, RequestOptions requestOpt } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Issue.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Issue.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawItemsClient.java b/src/main/java/com/merge/api/accounting/RawItemsClient.java index 4d1d34d78..17af2f644 100644 --- a/src/main/java/com/merge/api/accounting/RawItemsClient.java +++ b/src/main/java/com/merge/api/accounting/RawItemsClient.java @@ -22,9 +22,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -137,9 +135,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedItemList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedItemList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedItemList.class); Optional startingAfter = parsedResponse.getNext(); ItemsListRequest nextRequest = ItemsListRequest.builder() .from(request) @@ -152,12 +151,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -185,12 +180,10 @@ public MergeApiHttpResponse create(ItemEndpointRequest request, Re QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -207,16 +200,13 @@ public MergeApiHttpResponse create(ItemEndpointRequest request, Re } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ItemResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ItemResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -279,16 +269,13 @@ public MergeApiHttpResponse retrieve(String id, ItemsRetrieveRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Item.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Item.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -318,12 +305,10 @@ public MergeApiHttpResponse partialUpdate( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -340,16 +325,13 @@ public MergeApiHttpResponse partialUpdate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ItemResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ItemResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -383,16 +365,13 @@ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -425,16 +404,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawJournalEntriesClient.java b/src/main/java/com/merge/api/accounting/RawJournalEntriesClient.java index d71523312..76bb3aca2 100644 --- a/src/main/java/com/merge/api/accounting/RawJournalEntriesClient.java +++ b/src/main/java/com/merge/api/accounting/RawJournalEntriesClient.java @@ -25,9 +25,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -153,9 +151,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedJournalEntryList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedJournalEntryList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedJournalEntryList.class); Optional startingAfter = parsedResponse.getNext(); JournalEntriesListRequest nextRequest = JournalEntriesListRequest.builder() .from(request) @@ -169,12 +168,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -203,12 +198,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -225,17 +218,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), JournalEntryResponse.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, JournalEntryResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -298,16 +287,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), JournalEntry.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, JournalEntry.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -386,9 +372,10 @@ public MergeApiHttpResponse> linesRemoteFie } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); JournalEntriesLinesRemoteFieldClassesListRequest nextRequest = JournalEntriesLinesRemoteFieldClassesListRequest.builder() @@ -403,12 +390,8 @@ public MergeApiHttpResponse> linesRemoteFie .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -441,16 +424,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -529,9 +509,10 @@ public MergeApiHttpResponse> remoteFieldCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); JournalEntriesRemoteFieldClassesListRequest nextRequest = JournalEntriesRemoteFieldClassesListRequest.builder() @@ -546,12 +527,8 @@ public MergeApiHttpResponse> remoteFieldCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawLinkTokenClient.java b/src/main/java/com/merge/api/accounting/RawLinkTokenClient.java index 42a8e1320..de456c816 100644 --- a/src/main/java/com/merge/api/accounting/RawLinkTokenClient.java +++ b/src/main/java/com/merge/api/accounting/RawLinkTokenClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(EndUserDetailsRequest request, Req } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), LinkToken.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, LinkToken.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawLinkedAccountsClient.java b/src/main/java/com/merge/api/accounting/RawLinkedAccountsClient.java index 68d2bd0c1..b16c386b7 100644 --- a/src/main/java/com/merge/api/accounting/RawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/accounting/RawLinkedAccountsClient.java @@ -128,9 +128,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAccountDetailsAndActionsList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedAccountDetailsAndActionsList.class); + responseBodyString, PaginatedAccountDetailsAndActionsList.class); Optional startingAfter = parsedResponse.getNext(); LinkedAccountsListRequest nextRequest = LinkedAccountsListRequest.builder() .from(request) @@ -145,12 +146,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawPassthroughClient.java b/src/main/java/com/merge/api/accounting/RawPassthroughClient.java index 21a2d3dd1..1714b1690 100644 --- a/src/main/java/com/merge/api/accounting/RawPassthroughClient.java +++ b/src/main/java/com/merge/api/accounting/RawPassthroughClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(DataPassthroughRequest reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawPaymentMethodsClient.java b/src/main/java/com/merge/api/accounting/RawPaymentMethodsClient.java index 18ed9394c..b8a878c87 100644 --- a/src/main/java/com/merge/api/accounting/RawPaymentMethodsClient.java +++ b/src/main/java/com/merge/api/accounting/RawPaymentMethodsClient.java @@ -93,9 +93,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedPaymentMethodList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedPaymentMethodList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedPaymentMethodList.class); Optional startingAfter = parsedResponse.getNext(); PaymentMethodsListRequest nextRequest = PaymentMethodsListRequest.builder() .from(request) @@ -109,12 +110,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -166,16 +163,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaymentMethod.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaymentMethod.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawPaymentTermsClient.java b/src/main/java/com/merge/api/accounting/RawPaymentTermsClient.java index 778fb0ce0..6792a6fda 100644 --- a/src/main/java/com/merge/api/accounting/RawPaymentTermsClient.java +++ b/src/main/java/com/merge/api/accounting/RawPaymentTermsClient.java @@ -97,9 +97,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedPaymentTermList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedPaymentTermList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedPaymentTermList.class); Optional startingAfter = parsedResponse.getNext(); PaymentTermsListRequest nextRequest = PaymentTermsListRequest.builder() .from(request) @@ -113,12 +114,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -174,16 +171,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaymentTerm.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaymentTerm.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawPaymentsClient.java b/src/main/java/com/merge/api/accounting/RawPaymentsClient.java index 723b07980..725f28a0e 100644 --- a/src/main/java/com/merge/api/accounting/RawPaymentsClient.java +++ b/src/main/java/com/merge/api/accounting/RawPaymentsClient.java @@ -26,9 +26,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -162,9 +160,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedPaymentList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedPaymentList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedPaymentList.class); Optional startingAfter = parsedResponse.getNext(); PaymentsListRequest nextRequest = PaymentsListRequest.builder() .from(request) @@ -177,12 +176,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -210,12 +205,10 @@ public MergeApiHttpResponse create(PaymentEndpointRequest reque QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -232,16 +225,13 @@ public MergeApiHttpResponse create(PaymentEndpointRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaymentResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaymentResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -304,16 +294,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Payment.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Payment.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -343,12 +330,10 @@ public MergeApiHttpResponse partialUpdate( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -365,16 +350,13 @@ public MergeApiHttpResponse partialUpdate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaymentResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaymentResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -453,9 +435,10 @@ public MergeApiHttpResponse> lineItemsRemot } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); PaymentsLineItemsRemoteFieldClassesListRequest nextRequest = PaymentsLineItemsRemoteFieldClassesListRequest.builder() @@ -472,12 +455,8 @@ public MergeApiHttpResponse> lineItemsRemot .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -511,16 +490,13 @@ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -553,16 +529,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -641,9 +614,10 @@ public MergeApiHttpResponse> remoteFieldCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); PaymentsRemoteFieldClassesListRequest nextRequest = PaymentsRemoteFieldClassesListRequest.builder() .from(request) @@ -657,12 +631,8 @@ public MergeApiHttpResponse> remoteFieldCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawPhoneNumbersClient.java b/src/main/java/com/merge/api/accounting/RawPhoneNumbersClient.java index 1514811c1..4b8091e72 100644 --- a/src/main/java/com/merge/api/accounting/RawPhoneNumbersClient.java +++ b/src/main/java/com/merge/api/accounting/RawPhoneNumbersClient.java @@ -73,17 +73,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountingPhoneNumber.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountingPhoneNumber.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawProjectsClient.java b/src/main/java/com/merge/api/accounting/RawProjectsClient.java index 296efdadf..25fc84f56 100644 --- a/src/main/java/com/merge/api/accounting/RawProjectsClient.java +++ b/src/main/java/com/merge/api/accounting/RawProjectsClient.java @@ -92,17 +92,13 @@ public MergeApiHttpResponse list(ProjectsListRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedProjectList.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedProjectList.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -158,16 +154,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Project.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Project.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawPurchaseOrdersClient.java b/src/main/java/com/merge/api/accounting/RawPurchaseOrdersClient.java index 9994f919b..550cc54a1 100644 --- a/src/main/java/com/merge/api/accounting/RawPurchaseOrdersClient.java +++ b/src/main/java/com/merge/api/accounting/RawPurchaseOrdersClient.java @@ -25,9 +25,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -155,9 +153,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedPurchaseOrderList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedPurchaseOrderList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedPurchaseOrderList.class); Optional startingAfter = parsedResponse.getNext(); PurchaseOrdersListRequest nextRequest = PurchaseOrdersListRequest.builder() .from(request) @@ -171,12 +170,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -205,12 +200,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -227,17 +220,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PurchaseOrderResponse.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PurchaseOrderResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -308,16 +297,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PurchaseOrder.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PurchaseOrder.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -396,9 +382,10 @@ public MergeApiHttpResponse> lineItemsRemot } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); PurchaseOrdersLineItemsRemoteFieldClassesListRequest nextRequest = PurchaseOrdersLineItemsRemoteFieldClassesListRequest.builder() @@ -415,12 +402,8 @@ public MergeApiHttpResponse> lineItemsRemot .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -453,16 +436,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -541,9 +521,10 @@ public MergeApiHttpResponse> remoteFieldCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); PurchaseOrdersRemoteFieldClassesListRequest nextRequest = PurchaseOrdersRemoteFieldClassesListRequest.builder() @@ -558,12 +539,8 @@ public MergeApiHttpResponse> remoteFieldCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawRegenerateKeyClient.java b/src/main/java/com/merge/api/accounting/RawRegenerateKeyClient.java index 0f4bc9272..80d15cd63 100644 --- a/src/main/java/com/merge/api/accounting/RawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/accounting/RawRegenerateKeyClient.java @@ -65,16 +65,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawScopesClient.java b/src/main/java/com/merge/api/accounting/RawScopesClient.java index 22e347d6d..92e1feb26 100644 --- a/src/main/java/com/merge/api/accounting/RawScopesClient.java +++ b/src/main/java/com/merge/api/accounting/RawScopesClient.java @@ -56,17 +56,13 @@ public MergeApiHttpResponse defaultScopesRetrieve(RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -99,17 +95,13 @@ public MergeApiHttpResponse linkedAccountScopesRetrieve(Req } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -152,17 +144,13 @@ public MergeApiHttpResponse linkedAccountScopesCreate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawSyncStatusClient.java b/src/main/java/com/merge/api/accounting/RawSyncStatusClient.java index 7e4679be3..162342cea 100644 --- a/src/main/java/com/merge/api/accounting/RawSyncStatusClient.java +++ b/src/main/java/com/merge/api/accounting/RawSyncStatusClient.java @@ -74,9 +74,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedSyncStatusList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedSyncStatusList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedSyncStatusList.class); Optional startingAfter = parsedResponse.getNext(); SyncStatusListRequest nextRequest = SyncStatusListRequest.builder() .from(request) @@ -90,12 +91,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawTaxRatesClient.java b/src/main/java/com/merge/api/accounting/RawTaxRatesClient.java index 95fb7da60..3516fb8c5 100644 --- a/src/main/java/com/merge/api/accounting/RawTaxRatesClient.java +++ b/src/main/java/com/merge/api/accounting/RawTaxRatesClient.java @@ -125,9 +125,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTaxRateList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTaxRateList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTaxRateList.class); Optional startingAfter = parsedResponse.getNext(); TaxRatesListRequest nextRequest = TaxRatesListRequest.builder() .from(request) @@ -140,12 +141,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -201,16 +198,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TaxRate.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TaxRate.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawTrackingCategoriesClient.java b/src/main/java/com/merge/api/accounting/RawTrackingCategoriesClient.java index 2f9370ef8..373b8e6b4 100644 --- a/src/main/java/com/merge/api/accounting/RawTrackingCategoriesClient.java +++ b/src/main/java/com/merge/api/accounting/RawTrackingCategoriesClient.java @@ -141,9 +141,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTrackingCategoryList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTrackingCategoryList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTrackingCategoryList.class); Optional startingAfter = parsedResponse.getNext(); TrackingCategoriesListRequest nextRequest = TrackingCategoriesListRequest.builder() .from(request) @@ -157,12 +158,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -226,16 +223,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TrackingCategory.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TrackingCategory.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawTransactionsClient.java b/src/main/java/com/merge/api/accounting/RawTransactionsClient.java index 47e5435b8..6246131b4 100644 --- a/src/main/java/com/merge/api/accounting/RawTransactionsClient.java +++ b/src/main/java/com/merge/api/accounting/RawTransactionsClient.java @@ -135,9 +135,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTransactionList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTransactionList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTransactionList.class); Optional startingAfter = parsedResponse.getNext(); TransactionsListRequest nextRequest = TransactionsListRequest.builder() .from(request) @@ -151,12 +152,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -212,16 +209,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Transaction.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Transaction.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawVendorCreditsClient.java b/src/main/java/com/merge/api/accounting/RawVendorCreditsClient.java index f3f9cf763..7efe1b388 100644 --- a/src/main/java/com/merge/api/accounting/RawVendorCreditsClient.java +++ b/src/main/java/com/merge/api/accounting/RawVendorCreditsClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -142,9 +140,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedVendorCreditList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedVendorCreditList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedVendorCreditList.class); Optional startingAfter = parsedResponse.getNext(); VendorCreditsListRequest nextRequest = VendorCreditsListRequest.builder() .from(request) @@ -158,12 +157,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -192,12 +187,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -214,17 +207,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), VendorCreditResponse.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, VendorCreditResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -280,16 +269,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), VendorCredit.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, VendorCredit.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -322,16 +308,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/RawWebhookReceiversClient.java b/src/main/java/com/merge/api/accounting/RawWebhookReceiversClient.java index 9dd2a8114..b64d26d30 100644 --- a/src/main/java/com/merge/api/accounting/RawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/accounting/RawWebhookReceiversClient.java @@ -58,18 +58,15 @@ public MergeApiHttpResponse> list(RequestOptions requestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -110,16 +107,13 @@ public MergeApiHttpResponse create(WebhookReceiverRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), WebhookReceiver.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, WebhookReceiver.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/accounting/types/Address.java b/src/main/java/com/merge/api/accounting/types/Address.java index f8e223c47..edcec8582 100644 --- a/src/main/java/com/merge/api/accounting/types/Address.java +++ b/src/main/java/com/merge/api/accounting/types/Address.java @@ -121,6 +121,9 @@ public Optional getCity() { return city; } + /** + * @return The address's state or region. + */ @JsonProperty("state") public Optional getState() { return state; @@ -578,6 +581,9 @@ public Builder city(String city) { return this; } + /** + *

The address's state or region.

+ */ @JsonSetter(value = "state", nulls = Nulls.SKIP) public Builder state(Optional state) { this.state = state; diff --git a/src/main/java/com/merge/api/accounting/types/CompanyInfo.java b/src/main/java/com/merge/api/accounting/types/CompanyInfo.java index 1a963f04d..1dd6beb07 100644 --- a/src/main/java/com/merge/api/accounting/types/CompanyInfo.java +++ b/src/main/java/com/merge/api/accounting/types/CompanyInfo.java @@ -167,6 +167,317 @@ public Optional getFiscalYearEndDay() { return fiscalYearEndDay; } + /** + * @return The currency set in the company's accounting platform. + *
    + *
  • XUA - ADB Unit of Account
  • + *
  • AFN - Afghan Afghani
  • + *
  • AFA - Afghan Afghani (1927–2002)
  • + *
  • ALL - Albanian Lek
  • + *
  • ALK - Albanian Lek (1946–1965)
  • + *
  • DZD - Algerian Dinar
  • + *
  • ADP - Andorran Peseta
  • + *
  • AOA - Angolan Kwanza
  • + *
  • AOK - Angolan Kwanza (1977–1991)
  • + *
  • AON - Angolan New Kwanza (1990–2000)
  • + *
  • AOR - Angolan Readjusted Kwanza (1995–1999)
  • + *
  • ARA - Argentine Austral
  • + *
  • ARS - Argentine Peso
  • + *
  • ARM - Argentine Peso (1881–1970)
  • + *
  • ARP - Argentine Peso (1983–1985)
  • + *
  • ARL - Argentine Peso Ley (1970–1983)
  • + *
  • AMD - Armenian Dram
  • + *
  • AWG - Aruban Florin
  • + *
  • AUD - Australian Dollar
  • + *
  • ATS - Austrian Schilling
  • + *
  • AZN - Azerbaijani Manat
  • + *
  • AZM - Azerbaijani Manat (1993–2006)
  • + *
  • BSD - Bahamian Dollar
  • + *
  • BHD - Bahraini Dinar
  • + *
  • BDT - Bangladeshi Taka
  • + *
  • BBD - Barbadian Dollar
  • + *
  • BYN - Belarusian Ruble
  • + *
  • BYB - Belarusian Ruble (1994–1999)
  • + *
  • BYR - Belarusian Ruble (2000–2016)
  • + *
  • BEF - Belgian Franc
  • + *
  • BEC - Belgian Franc (convertible)
  • + *
  • BEL - Belgian Franc (financial)
  • + *
  • BZD - Belize Dollar
  • + *
  • BMD - Bermudan Dollar
  • + *
  • BTN - Bhutanese Ngultrum
  • + *
  • BOB - Bolivian Boliviano
  • + *
  • BOL - Bolivian Boliviano (1863–1963)
  • + *
  • BOV - Bolivian Mvdol
  • + *
  • BOP - Bolivian Peso
  • + *
  • BAM - Bosnia-Herzegovina Convertible Mark
  • + *
  • BAD - Bosnia-Herzegovina Dinar (1992–1994)
  • + *
  • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
  • + *
  • BWP - Botswanan Pula
  • + *
  • BRC - Brazilian Cruzado (1986–1989)
  • + *
  • BRZ - Brazilian Cruzeiro (1942–1967)
  • + *
  • BRE - Brazilian Cruzeiro (1990–1993)
  • + *
  • BRR - Brazilian Cruzeiro (1993–1994)
  • + *
  • BRN - Brazilian New Cruzado (1989–1990)
  • + *
  • BRB - Brazilian New Cruzeiro (1967–1986)
  • + *
  • BRL - Brazilian Real
  • + *
  • GBP - British Pound
  • + *
  • BND - Brunei Dollar
  • + *
  • BGL - Bulgarian Hard Lev
  • + *
  • BGN - Bulgarian Lev
  • + *
  • BGO - Bulgarian Lev (1879–1952)
  • + *
  • BGM - Bulgarian Socialist Lev
  • + *
  • BUK - Burmese Kyat
  • + *
  • BIF - Burundian Franc
  • + *
  • XPF - CFP Franc
  • + *
  • KHR - Cambodian Riel
  • + *
  • CAD - Canadian Dollar
  • + *
  • CVE - Cape Verdean Escudo
  • + *
  • KYD - Cayman Islands Dollar
  • + *
  • XAF - Central African CFA Franc
  • + *
  • CLE - Chilean Escudo
  • + *
  • CLP - Chilean Peso
  • + *
  • CLF - Chilean Unit of Account (UF)
  • + *
  • CNX - Chinese People’s Bank Dollar
  • + *
  • CNY - Chinese Yuan
  • + *
  • CNH - Chinese Yuan (offshore)
  • + *
  • COP - Colombian Peso
  • + *
  • COU - Colombian Real Value Unit
  • + *
  • KMF - Comorian Franc
  • + *
  • CDF - Congolese Franc
  • + *
  • CRC - Costa Rican Colón
  • + *
  • HRD - Croatian Dinar
  • + *
  • HRK - Croatian Kuna
  • + *
  • CUC - Cuban Convertible Peso
  • + *
  • CUP - Cuban Peso
  • + *
  • CYP - Cypriot Pound
  • + *
  • CZK - Czech Koruna
  • + *
  • CSK - Czechoslovak Hard Koruna
  • + *
  • DKK - Danish Krone
  • + *
  • DJF - Djiboutian Franc
  • + *
  • DOP - Dominican Peso
  • + *
  • NLG - Dutch Guilder
  • + *
  • XCD - East Caribbean Dollar
  • + *
  • DDM - East German Mark
  • + *
  • ECS - Ecuadorian Sucre
  • + *
  • ECV - Ecuadorian Unit of Constant Value
  • + *
  • EGP - Egyptian Pound
  • + *
  • GQE - Equatorial Guinean Ekwele
  • + *
  • ERN - Eritrean Nakfa
  • + *
  • EEK - Estonian Kroon
  • + *
  • ETB - Ethiopian Birr
  • + *
  • EUR - Euro
  • + *
  • XBA - European Composite Unit
  • + *
  • XEU - European Currency Unit
  • + *
  • XBB - European Monetary Unit
  • + *
  • XBC - European Unit of Account (XBC)
  • + *
  • XBD - European Unit of Account (XBD)
  • + *
  • FKP - Falkland Islands Pound
  • + *
  • FJD - Fijian Dollar
  • + *
  • FIM - Finnish Markka
  • + *
  • FRF - French Franc
  • + *
  • XFO - French Gold Franc
  • + *
  • XFU - French UIC-Franc
  • + *
  • GMD - Gambian Dalasi
  • + *
  • GEK - Georgian Kupon Larit
  • + *
  • GEL - Georgian Lari
  • + *
  • DEM - German Mark
  • + *
  • GHS - Ghanaian Cedi
  • + *
  • GHC - Ghanaian Cedi (1979–2007)
  • + *
  • GIP - Gibraltar Pound
  • + *
  • XAU - Gold
  • + *
  • GRD - Greek Drachma
  • + *
  • GTQ - Guatemalan Quetzal
  • + *
  • GWP - Guinea-Bissau Peso
  • + *
  • GNF - Guinean Franc
  • + *
  • GNS - Guinean Syli
  • + *
  • GYD - Guyanaese Dollar
  • + *
  • HTG - Haitian Gourde
  • + *
  • HNL - Honduran Lempira
  • + *
  • HKD - Hong Kong Dollar
  • + *
  • HUF - Hungarian Forint
  • + *
  • IMP - IMP
  • + *
  • ISK - Icelandic Króna
  • + *
  • ISJ - Icelandic Króna (1918–1981)
  • + *
  • INR - Indian Rupee
  • + *
  • IDR - Indonesian Rupiah
  • + *
  • IRR - Iranian Rial
  • + *
  • IQD - Iraqi Dinar
  • + *
  • IEP - Irish Pound
  • + *
  • ILS - Israeli New Shekel
  • + *
  • ILP - Israeli Pound
  • + *
  • ILR - Israeli Shekel (1980–1985)
  • + *
  • ITL - Italian Lira
  • + *
  • JMD - Jamaican Dollar
  • + *
  • JPY - Japanese Yen
  • + *
  • JOD - Jordanian Dinar
  • + *
  • KZT - Kazakhstani Tenge
  • + *
  • KES - Kenyan Shilling
  • + *
  • KWD - Kuwaiti Dinar
  • + *
  • KGS - Kyrgystani Som
  • + *
  • LAK - Laotian Kip
  • + *
  • LVL - Latvian Lats
  • + *
  • LVR - Latvian Ruble
  • + *
  • LBP - Lebanese Pound
  • + *
  • LSL - Lesotho Loti
  • + *
  • LRD - Liberian Dollar
  • + *
  • LYD - Libyan Dinar
  • + *
  • LTL - Lithuanian Litas
  • + *
  • LTT - Lithuanian Talonas
  • + *
  • LUL - Luxembourg Financial Franc
  • + *
  • LUC - Luxembourgian Convertible Franc
  • + *
  • LUF - Luxembourgian Franc
  • + *
  • MOP - Macanese Pataca
  • + *
  • MKD - Macedonian Denar
  • + *
  • MKN - Macedonian Denar (1992–1993)
  • + *
  • MGA - Malagasy Ariary
  • + *
  • MGF - Malagasy Franc
  • + *
  • MWK - Malawian Kwacha
  • + *
  • MYR - Malaysian Ringgit
  • + *
  • MVR - Maldivian Rufiyaa
  • + *
  • MVP - Maldivian Rupee (1947–1981)
  • + *
  • MLF - Malian Franc
  • + *
  • MTL - Maltese Lira
  • + *
  • MTP - Maltese Pound
  • + *
  • MRU - Mauritanian Ouguiya
  • + *
  • MRO - Mauritanian Ouguiya (1973–2017)
  • + *
  • MUR - Mauritian Rupee
  • + *
  • MXV - Mexican Investment Unit
  • + *
  • MXN - Mexican Peso
  • + *
  • MXP - Mexican Silver Peso (1861–1992)
  • + *
  • MDC - Moldovan Cupon
  • + *
  • MDL - Moldovan Leu
  • + *
  • MCF - Monegasque Franc
  • + *
  • MNT - Mongolian Tugrik
  • + *
  • MAD - Moroccan Dirham
  • + *
  • MAF - Moroccan Franc
  • + *
  • MZE - Mozambican Escudo
  • + *
  • MZN - Mozambican Metical
  • + *
  • MZM - Mozambican Metical (1980–2006)
  • + *
  • MMK - Myanmar Kyat
  • + *
  • NAD - Namibian Dollar
  • + *
  • NPR - Nepalese Rupee
  • + *
  • ANG - Netherlands Antillean Guilder
  • + *
  • TWD - New Taiwan Dollar
  • + *
  • NZD - New Zealand Dollar
  • + *
  • NIO - Nicaraguan Córdoba
  • + *
  • NIC - Nicaraguan Córdoba (1988–1991)
  • + *
  • NGN - Nigerian Naira
  • + *
  • KPW - North Korean Won
  • + *
  • NOK - Norwegian Krone
  • + *
  • OMR - Omani Rial
  • + *
  • PKR - Pakistani Rupee
  • + *
  • XPD - Palladium
  • + *
  • PAB - Panamanian Balboa
  • + *
  • PGK - Papua New Guinean Kina
  • + *
  • PYG - Paraguayan Guarani
  • + *
  • PEI - Peruvian Inti
  • + *
  • PEN - Peruvian Sol
  • + *
  • PES - Peruvian Sol (1863–1965)
  • + *
  • PHP - Philippine Peso
  • + *
  • XPT - Platinum
  • + *
  • PLN - Polish Zloty
  • + *
  • PLZ - Polish Zloty (1950–1995)
  • + *
  • PTE - Portuguese Escudo
  • + *
  • GWE - Portuguese Guinea Escudo
  • + *
  • QAR - Qatari Rial
  • + *
  • XRE - RINET Funds
  • + *
  • RHD - Rhodesian Dollar
  • + *
  • RON - Romanian Leu
  • + *
  • ROL - Romanian Leu (1952–2006)
  • + *
  • RUB - Russian Ruble
  • + *
  • RUR - Russian Ruble (1991–1998)
  • + *
  • RWF - Rwandan Franc
  • + *
  • SVC - Salvadoran Colón
  • + *
  • WST - Samoan Tala
  • + *
  • SAR - Saudi Riyal
  • + *
  • RSD - Serbian Dinar
  • + *
  • CSD - Serbian Dinar (2002–2006)
  • + *
  • SCR - Seychellois Rupee
  • + *
  • SLL - Sierra Leonean Leone
  • + *
  • XAG - Silver
  • + *
  • SGD - Singapore Dollar
  • + *
  • SKK - Slovak Koruna
  • + *
  • SIT - Slovenian Tolar
  • + *
  • SBD - Solomon Islands Dollar
  • + *
  • SOS - Somali Shilling
  • + *
  • ZAR - South African Rand
  • + *
  • ZAL - South African Rand (financial)
  • + *
  • KRH - South Korean Hwan (1953–1962)
  • + *
  • KRW - South Korean Won
  • + *
  • KRO - South Korean Won (1945–1953)
  • + *
  • SSP - South Sudanese Pound
  • + *
  • SUR - Soviet Rouble
  • + *
  • ESP - Spanish Peseta
  • + *
  • ESA - Spanish Peseta (A account)
  • + *
  • ESB - Spanish Peseta (convertible account)
  • + *
  • XDR - Special Drawing Rights
  • + *
  • LKR - Sri Lankan Rupee
  • + *
  • SHP - St. Helena Pound
  • + *
  • XSU - Sucre
  • + *
  • SDD - Sudanese Dinar (1992–2007)
  • + *
  • SDG - Sudanese Pound
  • + *
  • SDP - Sudanese Pound (1957–1998)
  • + *
  • SRD - Surinamese Dollar
  • + *
  • SRG - Surinamese Guilder
  • + *
  • SZL - Swazi Lilangeni
  • + *
  • SEK - Swedish Krona
  • + *
  • CHF - Swiss Franc
  • + *
  • SYP - Syrian Pound
  • + *
  • STN - São Tomé & Príncipe Dobra
  • + *
  • STD - São Tomé & Príncipe Dobra (1977–2017)
  • + *
  • TVD - TVD
  • + *
  • TJR - Tajikistani Ruble
  • + *
  • TJS - Tajikistani Somoni
  • + *
  • TZS - Tanzanian Shilling
  • + *
  • XTS - Testing Currency Code
  • + *
  • THB - Thai Baht
  • + *
  • XXX - The codes assigned for transactions where no currency is involved
  • + *
  • TPE - Timorese Escudo
  • + *
  • TOP - Tongan Paʻanga
  • + *
  • TTD - Trinidad & Tobago Dollar
  • + *
  • TND - Tunisian Dinar
  • + *
  • TRY - Turkish Lira
  • + *
  • TRL - Turkish Lira (1922–2005)
  • + *
  • TMT - Turkmenistani Manat
  • + *
  • TMM - Turkmenistani Manat (1993–2009)
  • + *
  • USD - US Dollar
  • + *
  • USN - US Dollar (Next day)
  • + *
  • USS - US Dollar (Same day)
  • + *
  • UGX - Ugandan Shilling
  • + *
  • UGS - Ugandan Shilling (1966–1987)
  • + *
  • UAH - Ukrainian Hryvnia
  • + *
  • UAK - Ukrainian Karbovanets
  • + *
  • AED - United Arab Emirates Dirham
  • + *
  • UYW - Uruguayan Nominal Wage Index Unit
  • + *
  • UYU - Uruguayan Peso
  • + *
  • UYP - Uruguayan Peso (1975–1993)
  • + *
  • UYI - Uruguayan Peso (Indexed Units)
  • + *
  • UZS - Uzbekistani Som
  • + *
  • VUV - Vanuatu Vatu
  • + *
  • VES - Venezuelan Bolívar
  • + *
  • VEB - Venezuelan Bolívar (1871–2008)
  • + *
  • VEF - Venezuelan Bolívar (2008–2018)
  • + *
  • VND - Vietnamese Dong
  • + *
  • VNN - Vietnamese Dong (1978–1985)
  • + *
  • CHE - WIR Euro
  • + *
  • CHW - WIR Franc
  • + *
  • XOF - West African CFA Franc
  • + *
  • YDD - Yemeni Dinar
  • + *
  • YER - Yemeni Rial
  • + *
  • YUN - Yugoslavian Convertible Dinar (1990–1992)
  • + *
  • YUD - Yugoslavian Hard Dinar (1966–1990)
  • + *
  • YUM - Yugoslavian New Dinar (1994–2002)
  • + *
  • YUR - Yugoslavian Reformed Dinar (1992–1993)
  • + *
  • ZWN - ZWN
  • + *
  • ZRN - Zairean New Zaire (1993–1998)
  • + *
  • ZRZ - Zairean Zaire (1971–1993)
  • + *
  • ZMW - Zambian Kwacha
  • + *
  • ZMK - Zambian Kwacha (1968–2012)
  • + *
  • ZWD - Zimbabwean Dollar (1980–2008)
  • + *
  • ZWR - Zimbabwean Dollar (2008)
  • + *
  • ZWL - Zimbabwean Dollar (2009)
  • + *
+ */ @JsonProperty("currency") public Optional getCurrency() { return currency; @@ -463,6 +774,317 @@ public Builder fiscalYearEndDay(Integer fiscalYearEndDay) { return this; } + /** + *

The currency set in the company's accounting platform.

+ *
    + *
  • XUA - ADB Unit of Account
  • + *
  • AFN - Afghan Afghani
  • + *
  • AFA - Afghan Afghani (1927–2002)
  • + *
  • ALL - Albanian Lek
  • + *
  • ALK - Albanian Lek (1946–1965)
  • + *
  • DZD - Algerian Dinar
  • + *
  • ADP - Andorran Peseta
  • + *
  • AOA - Angolan Kwanza
  • + *
  • AOK - Angolan Kwanza (1977–1991)
  • + *
  • AON - Angolan New Kwanza (1990–2000)
  • + *
  • AOR - Angolan Readjusted Kwanza (1995–1999)
  • + *
  • ARA - Argentine Austral
  • + *
  • ARS - Argentine Peso
  • + *
  • ARM - Argentine Peso (1881–1970)
  • + *
  • ARP - Argentine Peso (1983–1985)
  • + *
  • ARL - Argentine Peso Ley (1970–1983)
  • + *
  • AMD - Armenian Dram
  • + *
  • AWG - Aruban Florin
  • + *
  • AUD - Australian Dollar
  • + *
  • ATS - Austrian Schilling
  • + *
  • AZN - Azerbaijani Manat
  • + *
  • AZM - Azerbaijani Manat (1993–2006)
  • + *
  • BSD - Bahamian Dollar
  • + *
  • BHD - Bahraini Dinar
  • + *
  • BDT - Bangladeshi Taka
  • + *
  • BBD - Barbadian Dollar
  • + *
  • BYN - Belarusian Ruble
  • + *
  • BYB - Belarusian Ruble (1994–1999)
  • + *
  • BYR - Belarusian Ruble (2000–2016)
  • + *
  • BEF - Belgian Franc
  • + *
  • BEC - Belgian Franc (convertible)
  • + *
  • BEL - Belgian Franc (financial)
  • + *
  • BZD - Belize Dollar
  • + *
  • BMD - Bermudan Dollar
  • + *
  • BTN - Bhutanese Ngultrum
  • + *
  • BOB - Bolivian Boliviano
  • + *
  • BOL - Bolivian Boliviano (1863–1963)
  • + *
  • BOV - Bolivian Mvdol
  • + *
  • BOP - Bolivian Peso
  • + *
  • BAM - Bosnia-Herzegovina Convertible Mark
  • + *
  • BAD - Bosnia-Herzegovina Dinar (1992–1994)
  • + *
  • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
  • + *
  • BWP - Botswanan Pula
  • + *
  • BRC - Brazilian Cruzado (1986–1989)
  • + *
  • BRZ - Brazilian Cruzeiro (1942–1967)
  • + *
  • BRE - Brazilian Cruzeiro (1990–1993)
  • + *
  • BRR - Brazilian Cruzeiro (1993–1994)
  • + *
  • BRN - Brazilian New Cruzado (1989–1990)
  • + *
  • BRB - Brazilian New Cruzeiro (1967–1986)
  • + *
  • BRL - Brazilian Real
  • + *
  • GBP - British Pound
  • + *
  • BND - Brunei Dollar
  • + *
  • BGL - Bulgarian Hard Lev
  • + *
  • BGN - Bulgarian Lev
  • + *
  • BGO - Bulgarian Lev (1879–1952)
  • + *
  • BGM - Bulgarian Socialist Lev
  • + *
  • BUK - Burmese Kyat
  • + *
  • BIF - Burundian Franc
  • + *
  • XPF - CFP Franc
  • + *
  • KHR - Cambodian Riel
  • + *
  • CAD - Canadian Dollar
  • + *
  • CVE - Cape Verdean Escudo
  • + *
  • KYD - Cayman Islands Dollar
  • + *
  • XAF - Central African CFA Franc
  • + *
  • CLE - Chilean Escudo
  • + *
  • CLP - Chilean Peso
  • + *
  • CLF - Chilean Unit of Account (UF)
  • + *
  • CNX - Chinese People’s Bank Dollar
  • + *
  • CNY - Chinese Yuan
  • + *
  • CNH - Chinese Yuan (offshore)
  • + *
  • COP - Colombian Peso
  • + *
  • COU - Colombian Real Value Unit
  • + *
  • KMF - Comorian Franc
  • + *
  • CDF - Congolese Franc
  • + *
  • CRC - Costa Rican Colón
  • + *
  • HRD - Croatian Dinar
  • + *
  • HRK - Croatian Kuna
  • + *
  • CUC - Cuban Convertible Peso
  • + *
  • CUP - Cuban Peso
  • + *
  • CYP - Cypriot Pound
  • + *
  • CZK - Czech Koruna
  • + *
  • CSK - Czechoslovak Hard Koruna
  • + *
  • DKK - Danish Krone
  • + *
  • DJF - Djiboutian Franc
  • + *
  • DOP - Dominican Peso
  • + *
  • NLG - Dutch Guilder
  • + *
  • XCD - East Caribbean Dollar
  • + *
  • DDM - East German Mark
  • + *
  • ECS - Ecuadorian Sucre
  • + *
  • ECV - Ecuadorian Unit of Constant Value
  • + *
  • EGP - Egyptian Pound
  • + *
  • GQE - Equatorial Guinean Ekwele
  • + *
  • ERN - Eritrean Nakfa
  • + *
  • EEK - Estonian Kroon
  • + *
  • ETB - Ethiopian Birr
  • + *
  • EUR - Euro
  • + *
  • XBA - European Composite Unit
  • + *
  • XEU - European Currency Unit
  • + *
  • XBB - European Monetary Unit
  • + *
  • XBC - European Unit of Account (XBC)
  • + *
  • XBD - European Unit of Account (XBD)
  • + *
  • FKP - Falkland Islands Pound
  • + *
  • FJD - Fijian Dollar
  • + *
  • FIM - Finnish Markka
  • + *
  • FRF - French Franc
  • + *
  • XFO - French Gold Franc
  • + *
  • XFU - French UIC-Franc
  • + *
  • GMD - Gambian Dalasi
  • + *
  • GEK - Georgian Kupon Larit
  • + *
  • GEL - Georgian Lari
  • + *
  • DEM - German Mark
  • + *
  • GHS - Ghanaian Cedi
  • + *
  • GHC - Ghanaian Cedi (1979–2007)
  • + *
  • GIP - Gibraltar Pound
  • + *
  • XAU - Gold
  • + *
  • GRD - Greek Drachma
  • + *
  • GTQ - Guatemalan Quetzal
  • + *
  • GWP - Guinea-Bissau Peso
  • + *
  • GNF - Guinean Franc
  • + *
  • GNS - Guinean Syli
  • + *
  • GYD - Guyanaese Dollar
  • + *
  • HTG - Haitian Gourde
  • + *
  • HNL - Honduran Lempira
  • + *
  • HKD - Hong Kong Dollar
  • + *
  • HUF - Hungarian Forint
  • + *
  • IMP - IMP
  • + *
  • ISK - Icelandic Króna
  • + *
  • ISJ - Icelandic Króna (1918–1981)
  • + *
  • INR - Indian Rupee
  • + *
  • IDR - Indonesian Rupiah
  • + *
  • IRR - Iranian Rial
  • + *
  • IQD - Iraqi Dinar
  • + *
  • IEP - Irish Pound
  • + *
  • ILS - Israeli New Shekel
  • + *
  • ILP - Israeli Pound
  • + *
  • ILR - Israeli Shekel (1980–1985)
  • + *
  • ITL - Italian Lira
  • + *
  • JMD - Jamaican Dollar
  • + *
  • JPY - Japanese Yen
  • + *
  • JOD - Jordanian Dinar
  • + *
  • KZT - Kazakhstani Tenge
  • + *
  • KES - Kenyan Shilling
  • + *
  • KWD - Kuwaiti Dinar
  • + *
  • KGS - Kyrgystani Som
  • + *
  • LAK - Laotian Kip
  • + *
  • LVL - Latvian Lats
  • + *
  • LVR - Latvian Ruble
  • + *
  • LBP - Lebanese Pound
  • + *
  • LSL - Lesotho Loti
  • + *
  • LRD - Liberian Dollar
  • + *
  • LYD - Libyan Dinar
  • + *
  • LTL - Lithuanian Litas
  • + *
  • LTT - Lithuanian Talonas
  • + *
  • LUL - Luxembourg Financial Franc
  • + *
  • LUC - Luxembourgian Convertible Franc
  • + *
  • LUF - Luxembourgian Franc
  • + *
  • MOP - Macanese Pataca
  • + *
  • MKD - Macedonian Denar
  • + *
  • MKN - Macedonian Denar (1992–1993)
  • + *
  • MGA - Malagasy Ariary
  • + *
  • MGF - Malagasy Franc
  • + *
  • MWK - Malawian Kwacha
  • + *
  • MYR - Malaysian Ringgit
  • + *
  • MVR - Maldivian Rufiyaa
  • + *
  • MVP - Maldivian Rupee (1947–1981)
  • + *
  • MLF - Malian Franc
  • + *
  • MTL - Maltese Lira
  • + *
  • MTP - Maltese Pound
  • + *
  • MRU - Mauritanian Ouguiya
  • + *
  • MRO - Mauritanian Ouguiya (1973–2017)
  • + *
  • MUR - Mauritian Rupee
  • + *
  • MXV - Mexican Investment Unit
  • + *
  • MXN - Mexican Peso
  • + *
  • MXP - Mexican Silver Peso (1861–1992)
  • + *
  • MDC - Moldovan Cupon
  • + *
  • MDL - Moldovan Leu
  • + *
  • MCF - Monegasque Franc
  • + *
  • MNT - Mongolian Tugrik
  • + *
  • MAD - Moroccan Dirham
  • + *
  • MAF - Moroccan Franc
  • + *
  • MZE - Mozambican Escudo
  • + *
  • MZN - Mozambican Metical
  • + *
  • MZM - Mozambican Metical (1980–2006)
  • + *
  • MMK - Myanmar Kyat
  • + *
  • NAD - Namibian Dollar
  • + *
  • NPR - Nepalese Rupee
  • + *
  • ANG - Netherlands Antillean Guilder
  • + *
  • TWD - New Taiwan Dollar
  • + *
  • NZD - New Zealand Dollar
  • + *
  • NIO - Nicaraguan Córdoba
  • + *
  • NIC - Nicaraguan Córdoba (1988–1991)
  • + *
  • NGN - Nigerian Naira
  • + *
  • KPW - North Korean Won
  • + *
  • NOK - Norwegian Krone
  • + *
  • OMR - Omani Rial
  • + *
  • PKR - Pakistani Rupee
  • + *
  • XPD - Palladium
  • + *
  • PAB - Panamanian Balboa
  • + *
  • PGK - Papua New Guinean Kina
  • + *
  • PYG - Paraguayan Guarani
  • + *
  • PEI - Peruvian Inti
  • + *
  • PEN - Peruvian Sol
  • + *
  • PES - Peruvian Sol (1863–1965)
  • + *
  • PHP - Philippine Peso
  • + *
  • XPT - Platinum
  • + *
  • PLN - Polish Zloty
  • + *
  • PLZ - Polish Zloty (1950–1995)
  • + *
  • PTE - Portuguese Escudo
  • + *
  • GWE - Portuguese Guinea Escudo
  • + *
  • QAR - Qatari Rial
  • + *
  • XRE - RINET Funds
  • + *
  • RHD - Rhodesian Dollar
  • + *
  • RON - Romanian Leu
  • + *
  • ROL - Romanian Leu (1952–2006)
  • + *
  • RUB - Russian Ruble
  • + *
  • RUR - Russian Ruble (1991–1998)
  • + *
  • RWF - Rwandan Franc
  • + *
  • SVC - Salvadoran Colón
  • + *
  • WST - Samoan Tala
  • + *
  • SAR - Saudi Riyal
  • + *
  • RSD - Serbian Dinar
  • + *
  • CSD - Serbian Dinar (2002–2006)
  • + *
  • SCR - Seychellois Rupee
  • + *
  • SLL - Sierra Leonean Leone
  • + *
  • XAG - Silver
  • + *
  • SGD - Singapore Dollar
  • + *
  • SKK - Slovak Koruna
  • + *
  • SIT - Slovenian Tolar
  • + *
  • SBD - Solomon Islands Dollar
  • + *
  • SOS - Somali Shilling
  • + *
  • ZAR - South African Rand
  • + *
  • ZAL - South African Rand (financial)
  • + *
  • KRH - South Korean Hwan (1953–1962)
  • + *
  • KRW - South Korean Won
  • + *
  • KRO - South Korean Won (1945–1953)
  • + *
  • SSP - South Sudanese Pound
  • + *
  • SUR - Soviet Rouble
  • + *
  • ESP - Spanish Peseta
  • + *
  • ESA - Spanish Peseta (A account)
  • + *
  • ESB - Spanish Peseta (convertible account)
  • + *
  • XDR - Special Drawing Rights
  • + *
  • LKR - Sri Lankan Rupee
  • + *
  • SHP - St. Helena Pound
  • + *
  • XSU - Sucre
  • + *
  • SDD - Sudanese Dinar (1992–2007)
  • + *
  • SDG - Sudanese Pound
  • + *
  • SDP - Sudanese Pound (1957–1998)
  • + *
  • SRD - Surinamese Dollar
  • + *
  • SRG - Surinamese Guilder
  • + *
  • SZL - Swazi Lilangeni
  • + *
  • SEK - Swedish Krona
  • + *
  • CHF - Swiss Franc
  • + *
  • SYP - Syrian Pound
  • + *
  • STN - São Tomé & Príncipe Dobra
  • + *
  • STD - São Tomé & Príncipe Dobra (1977–2017)
  • + *
  • TVD - TVD
  • + *
  • TJR - Tajikistani Ruble
  • + *
  • TJS - Tajikistani Somoni
  • + *
  • TZS - Tanzanian Shilling
  • + *
  • XTS - Testing Currency Code
  • + *
  • THB - Thai Baht
  • + *
  • XXX - The codes assigned for transactions where no currency is involved
  • + *
  • TPE - Timorese Escudo
  • + *
  • TOP - Tongan Paʻanga
  • + *
  • TTD - Trinidad & Tobago Dollar
  • + *
  • TND - Tunisian Dinar
  • + *
  • TRY - Turkish Lira
  • + *
  • TRL - Turkish Lira (1922–2005)
  • + *
  • TMT - Turkmenistani Manat
  • + *
  • TMM - Turkmenistani Manat (1993–2009)
  • + *
  • USD - US Dollar
  • + *
  • USN - US Dollar (Next day)
  • + *
  • USS - US Dollar (Same day)
  • + *
  • UGX - Ugandan Shilling
  • + *
  • UGS - Ugandan Shilling (1966–1987)
  • + *
  • UAH - Ukrainian Hryvnia
  • + *
  • UAK - Ukrainian Karbovanets
  • + *
  • AED - United Arab Emirates Dirham
  • + *
  • UYW - Uruguayan Nominal Wage Index Unit
  • + *
  • UYU - Uruguayan Peso
  • + *
  • UYP - Uruguayan Peso (1975–1993)
  • + *
  • UYI - Uruguayan Peso (Indexed Units)
  • + *
  • UZS - Uzbekistani Som
  • + *
  • VUV - Vanuatu Vatu
  • + *
  • VES - Venezuelan Bolívar
  • + *
  • VEB - Venezuelan Bolívar (1871–2008)
  • + *
  • VEF - Venezuelan Bolívar (2008–2018)
  • + *
  • VND - Vietnamese Dong
  • + *
  • VNN - Vietnamese Dong (1978–1985)
  • + *
  • CHE - WIR Euro
  • + *
  • CHW - WIR Franc
  • + *
  • XOF - West African CFA Franc
  • + *
  • YDD - Yemeni Dinar
  • + *
  • YER - Yemeni Rial
  • + *
  • YUN - Yugoslavian Convertible Dinar (1990–1992)
  • + *
  • YUD - Yugoslavian Hard Dinar (1966–1990)
  • + *
  • YUM - Yugoslavian New Dinar (1994–2002)
  • + *
  • YUR - Yugoslavian Reformed Dinar (1992–1993)
  • + *
  • ZWN - ZWN
  • + *
  • ZRN - Zairean New Zaire (1993–1998)
  • + *
  • ZRZ - Zairean Zaire (1971–1993)
  • + *
  • ZMW - Zambian Kwacha
  • + *
  • ZMK - Zambian Kwacha (1968–2012)
  • + *
  • ZWD - Zimbabwean Dollar (1980–2008)
  • + *
  • ZWR - Zimbabwean Dollar (2008)
  • + *
  • ZWL - Zimbabwean Dollar (2009)
  • + *
+ */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) public Builder currency(Optional currency) { this.currency = currency; diff --git a/src/main/java/com/merge/api/accounting/types/RemoteData.java b/src/main/java/com/merge/api/accounting/types/RemoteData.java index aae8477b5..39b391c0d 100644 --- a/src/main/java/com/merge/api/accounting/types/RemoteData.java +++ b/src/main/java/com/merge/api/accounting/types/RemoteData.java @@ -42,6 +42,9 @@ public String getPath() { return path; } + /** + * @return The data returned from the third-party for this object in its original, unnormalized format. + */ @JsonProperty("data") public Optional getData() { return data; @@ -88,6 +91,9 @@ public interface PathStage { public interface _FinalStage { RemoteData build(); + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ */ _FinalStage data(Optional data); _FinalStage data(JsonNode data); @@ -123,12 +129,19 @@ public _FinalStage path(@NotNull String path) { return this; } + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage data(JsonNode data) { this.data = Optional.ofNullable(data); return this; } + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ */ @java.lang.Override @JsonSetter(value = "data", nulls = Nulls.SKIP) public _FinalStage data(Optional data) { diff --git a/src/main/java/com/merge/api/ats/AsyncRawAccountDetailsClient.java b/src/main/java/com/merge/api/ats/AsyncRawAccountDetailsClient.java index ec6fa2cc4..2328b501e 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawAccountDetailsClient.java @@ -59,18 +59,16 @@ public CompletableFuture> retrieve(RequestO @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountDetails.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountDetails.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawAccountTokenClient.java b/src/main/java/com/merge/api/ats/AsyncRawAccountTokenClient.java index 3dd75672f..a97c75f82 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawAccountTokenClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawAccountTokenClient.java @@ -61,18 +61,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountToken.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountToken.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawActivitiesClient.java b/src/main/java/com/merge/api/ats/AsyncRawActivitiesClient.java index f2b220afa..dd36a42b2 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawActivitiesClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawActivitiesClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -144,9 +142,10 @@ public CompletableFuture>> lis @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedActivityList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedActivityList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedActivityList.class); Optional startingAfter = parsedResponse.getNext(); ActivitiesListRequest nextRequest = ActivitiesListRequest.builder() .from(request) @@ -167,12 +166,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -210,13 +206,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); - properties.put("remote_user_id", request.getRemoteUserId()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -236,18 +229,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ActivityResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ActivityResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -323,17 +314,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Activity.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Activity.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -378,18 +367,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawApplicationsClient.java b/src/main/java/com/merge/api/ats/AsyncRawApplicationsClient.java index 844da1578..ccb0208b2 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawApplicationsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawApplicationsClient.java @@ -23,9 +23,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -159,9 +157,10 @@ public CompletableFuture>> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedApplicationList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedApplicationList.class); + PaginatedApplicationList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedApplicationList.class); Optional startingAfter = parsedResponse.getNext(); ApplicationsListRequest nextRequest = ApplicationsListRequest.builder() .from(request) @@ -182,12 +181,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -229,13 +225,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); - properties.put("remote_user_id", request.getRemoteUserId()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -255,18 +248,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ApplicationResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApplicationResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -335,18 +326,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Application.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Application.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -394,17 +382,10 @@ public CompletableFuture> changeStageC QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - if (request.getJobInterviewStage().isPresent()) { - properties.put("job_interview_stage", request.getJobInterviewStage()); - } - if (request.getRemoteUserId().isPresent()) { - properties.put("remote_user_id", request.getRemoteUserId()); - } RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -424,18 +405,16 @@ public CompletableFuture> changeStageC @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ApplicationResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApplicationResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -495,18 +474,15 @@ public CompletableFuture> metaPostRetrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawAsyncPassthroughClient.java b/src/main/java/com/merge/api/ats/AsyncRawAsyncPassthroughClient.java index 61c7ce08a..6592100e1 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawAsyncPassthroughClient.java @@ -73,19 +73,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughReciept.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughReciept.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -133,19 +130,17 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughRetrieveResponse.class), + responseBodyString, AsyncPassthroughRetrieveResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawAttachmentsClient.java b/src/main/java/com/merge/api/ats/AsyncRawAttachmentsClient.java index 363f95acc..3c4195e9f 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawAttachmentsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawAttachmentsClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -145,9 +143,10 @@ public CompletableFuture>> l @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedAttachmentList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedAttachmentList.class); + PaginatedAttachmentList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAttachmentList.class); Optional startingAfter = parsedResponse.getNext(); AttachmentsListRequest nextRequest = AttachmentsListRequest.builder() .from(request) @@ -168,12 +167,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -211,13 +207,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); - properties.put("remote_user_id", request.getRemoteUserId()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -237,18 +230,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AttachmentResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AttachmentResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -324,18 +315,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Attachment.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Attachment.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -380,18 +368,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawAuditTrailClient.java b/src/main/java/com/merge/api/ats/AsyncRawAuditTrailClient.java index 6d26ba9db..e91a94f24 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawAuditTrailClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawAuditTrailClient.java @@ -99,9 +99,10 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAuditLogEventList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedAuditLogEventList.class); + responseBodyString, PaginatedAuditLogEventList.class); Optional startingAfter = parsedResponse.getNext(); AuditTrailListRequest nextRequest = AuditTrailListRequest.builder() .from(request) @@ -122,12 +123,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawAvailableActionsClient.java b/src/main/java/com/merge/api/ats/AsyncRawAvailableActionsClient.java index 0f8544713..28585911d 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawAvailableActionsClient.java @@ -59,18 +59,16 @@ public CompletableFuture> retrieve(Reques @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AvailableActions.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AvailableActions.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawCandidatesClient.java b/src/main/java/com/merge/api/ats/AsyncRawCandidatesClient.java index 2cbebbbf9..5d7e7710e 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawCandidatesClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawCandidatesClient.java @@ -24,9 +24,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -151,9 +149,10 @@ public CompletableFuture>> li @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedCandidateList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedCandidateList.class); + PaginatedCandidateList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedCandidateList.class); Optional startingAfter = parsedResponse.getNext(); CandidatesListRequest nextRequest = CandidatesListRequest.builder() .from(request) @@ -174,12 +173,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -217,13 +213,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); - properties.put("remote_user_id", request.getRemoteUserId()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -243,18 +236,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CandidateResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CandidateResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -322,17 +313,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Candidate.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Candidate.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -372,13 +361,10 @@ public CompletableFuture> partialUpdate( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); - properties.put("remote_user_id", request.getRemoteUserId()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -398,18 +384,16 @@ public CompletableFuture> partialUpdate( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CandidateResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CandidateResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -469,11 +453,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO return; } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -520,18 +502,15 @@ public CompletableFuture> metaPatchRetrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -576,18 +555,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawDeleteAccountClient.java b/src/main/java/com/merge/api/ats/AsyncRawDeleteAccountClient.java index 9949058f1..0e31b3625 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawDeleteAccountClient.java @@ -63,11 +63,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO return; } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawDepartmentsClient.java b/src/main/java/com/merge/api/ats/AsyncRawDepartmentsClient.java index a27ebbde7..c97dcd4d1 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawDepartmentsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawDepartmentsClient.java @@ -122,9 +122,10 @@ public CompletableFuture>> l @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedDepartmentList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedDepartmentList.class); + PaginatedDepartmentList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedDepartmentList.class); Optional startingAfter = parsedResponse.getNext(); DepartmentsListRequest nextRequest = DepartmentsListRequest.builder() .from(request) @@ -145,12 +146,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -214,18 +212,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Department.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Department.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawEeocsClient.java b/src/main/java/com/merge/api/ats/AsyncRawEeocsClient.java index b8de1feef..98fa9e69b 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawEeocsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawEeocsClient.java @@ -137,9 +137,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedEeocList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedEeocList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedEeocList.class); Optional startingAfter = parsedResponse.getNext(); EeocsListRequest nextRequest = EeocsListRequest.builder() .from(request) @@ -159,12 +160,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -240,17 +238,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Eeoc.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Eeoc.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawFieldMappingClient.java b/src/main/java/com/merge/api/ats/AsyncRawFieldMappingClient.java index ea2205c76..28d617761 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawFieldMappingClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawFieldMappingClient.java @@ -21,8 +21,6 @@ import com.merge.api.core.QueryStringMapper; import com.merge.api.core.RequestOptions; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -87,19 +85,17 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingApiInstanceResponse.class), + responseBodyString, FieldMappingApiInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -137,17 +133,10 @@ public CompletableFuture> fie request.getExcludeRemoteFieldMetadata().get(), false); } - Map properties = new HashMap<>(); - properties.put("target_field_name", request.getTargetFieldName()); - properties.put("target_field_description", request.getTargetFieldDescription()); - properties.put("remote_field_traversal_path", request.getRemoteFieldTraversalPath()); - properties.put("remote_method", request.getRemoteMethod()); - properties.put("remote_url_path", request.getRemoteUrlPath()); - properties.put("common_model_name", request.getCommonModelName()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -167,19 +156,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -227,19 +214,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -304,19 +289,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -380,19 +363,16 @@ public CompletableFuture> remoteFie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), RemoteFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteFieldApiResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -438,19 +418,17 @@ public CompletableFuture> t @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), ExternalTargetFieldApiResponse.class), + responseBodyString, ExternalTargetFieldApiResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawForceResyncClient.java b/src/main/java/com/merge/api/ats/AsyncRawForceResyncClient.java index d35a86847..49e7044ad 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawForceResyncClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawForceResyncClient.java @@ -63,19 +63,17 @@ public CompletableFuture>> syncStatusResyn @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawGenerateKeyClient.java b/src/main/java/com/merge/api/ats/AsyncRawGenerateKeyClient.java index bb0c4c389..991cb972f 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawGenerateKeyClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawInterviewsClient.java b/src/main/java/com/merge/api/ats/AsyncRawInterviewsClient.java index fe78fcf54..eb0475943 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawInterviewsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawInterviewsClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -161,9 +159,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); InterviewsListRequest nextRequest = InterviewsListRequest.builder() .from(request) @@ -185,12 +184,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -229,13 +225,10 @@ public CompletableFuture> creat QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); - properties.put("remote_user_id", request.getRemoteUserId()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -255,19 +248,17 @@ public CompletableFuture> creat @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), ScheduledInterviewResponse.class), + responseBodyString, ScheduledInterviewResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -344,18 +335,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ScheduledInterview.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ScheduledInterview.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -400,18 +389,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawIssuesClient.java b/src/main/java/com/merge/api/ats/AsyncRawIssuesClient.java index cf29392f7..6f32cc579 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawIssuesClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawIssuesClient.java @@ -145,9 +145,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedIssueList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedIssueList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedIssueList.class); Optional startingAfter = parsedResponse.getNext(); IssuesListRequest nextRequest = IssuesListRequest.builder() .from(request) @@ -167,12 +168,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -218,17 +216,15 @@ public CompletableFuture> retrieve(String id, Reques @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Issue.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Issue.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawJobInterviewStagesClient.java b/src/main/java/com/merge/api/ats/AsyncRawJobInterviewStagesClient.java index 8a3ee758b..cbf9ecd21 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawJobInterviewStagesClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawJobInterviewStagesClient.java @@ -131,9 +131,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); JobInterviewStagesListRequest nextRequest = JobInterviewStagesListRequest.builder() .from(request) @@ -155,12 +156,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -229,18 +227,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), JobInterviewStage.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, JobInterviewStage.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawJobPostingsClient.java b/src/main/java/com/merge/api/ats/AsyncRawJobPostingsClient.java index 69f91bdb8..8ef65dc1a 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawJobPostingsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawJobPostingsClient.java @@ -130,9 +130,10 @@ public CompletableFuture>> l @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedJobPostingList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedJobPostingList.class); + PaginatedJobPostingList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedJobPostingList.class); Optional startingAfter = parsedResponse.getNext(); JobPostingsListRequest nextRequest = JobPostingsListRequest.builder() .from(request) @@ -153,12 +154,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -226,18 +224,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), JobPosting.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, JobPosting.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawJobsClient.java b/src/main/java/com/merge/api/ats/AsyncRawJobsClient.java index 9e9d8723d..f76e5abdd 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawJobsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawJobsClient.java @@ -148,9 +148,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedJobList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedJobList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedJobList.class); Optional startingAfter = parsedResponse.getNext(); JobsListRequest nextRequest = JobsListRequest.builder() .from(request) @@ -170,12 +171,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -251,17 +249,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Job.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Job.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -349,9 +345,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); JobsScreeningQuestionsListRequest nextRequest = JobsScreeningQuestionsListRequest.builder() .from(request) @@ -373,12 +370,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawLinkTokenClient.java b/src/main/java/com/merge/api/ats/AsyncRawLinkTokenClient.java index dc05b56df..2e82b74eb 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawLinkTokenClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawLinkTokenClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), LinkToken.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, LinkToken.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawLinkedAccountsClient.java b/src/main/java/com/merge/api/ats/AsyncRawLinkedAccountsClient.java index 004dd82b6..cb4b0e2d3 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawLinkedAccountsClient.java @@ -138,9 +138,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); LinkedAccountsListRequest nextRequest = LinkedAccountsListRequest.builder() .from(request) @@ -162,12 +163,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawOffersClient.java b/src/main/java/com/merge/api/ats/AsyncRawOffersClient.java index a558e70e0..fc53eb376 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawOffersClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawOffersClient.java @@ -141,9 +141,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedOfferList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedOfferList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedOfferList.class); Optional startingAfter = parsedResponse.getNext(); OffersListRequest nextRequest = OffersListRequest.builder() .from(request) @@ -163,12 +164,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -244,17 +242,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Offer.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Offer.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawOfficesClient.java b/src/main/java/com/merge/api/ats/AsyncRawOfficesClient.java index 0a8158af9..c575a1497 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawOfficesClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawOfficesClient.java @@ -121,9 +121,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedOfficeList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedOfficeList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedOfficeList.class); Optional startingAfter = parsedResponse.getNext(); OfficesListRequest nextRequest = OfficesListRequest.builder() .from(request) @@ -144,12 +145,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -213,17 +211,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Office.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Office.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawPassthroughClient.java b/src/main/java/com/merge/api/ats/AsyncRawPassthroughClient.java index d26f4af70..d9edefe87 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawPassthroughClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawPassthroughClient.java @@ -72,18 +72,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawRegenerateKeyClient.java b/src/main/java/com/merge/api/ats/AsyncRawRegenerateKeyClient.java index 408bb26a0..19c94589f 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawRegenerateKeyClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawRejectReasonsClient.java b/src/main/java/com/merge/api/ats/AsyncRawRejectReasonsClient.java index 2ba7f682b..3234fbb33 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawRejectReasonsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawRejectReasonsClient.java @@ -122,9 +122,10 @@ public CompletableFuture>> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRejectReasonList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedRejectReasonList.class); + responseBodyString, PaginatedRejectReasonList.class); Optional startingAfter = parsedResponse.getNext(); RejectReasonsListRequest nextRequest = RejectReasonsListRequest.builder() .from(request) @@ -145,12 +146,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -215,18 +213,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RejectReason.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RejectReason.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawScopesClient.java b/src/main/java/com/merge/api/ats/AsyncRawScopesClient.java index 04a038078..97dc34d3a 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawScopesClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawScopesClient.java @@ -64,18 +64,16 @@ public CompletableFuture> defaultScope @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -121,18 +119,16 @@ public CompletableFuture> linkedAccoun @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -187,18 +183,16 @@ public CompletableFuture> linkedAccoun @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawScorecardsClient.java b/src/main/java/com/merge/api/ats/AsyncRawScorecardsClient.java index 7cc715c44..5cb80a724 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawScorecardsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawScorecardsClient.java @@ -145,9 +145,10 @@ public CompletableFuture>> li @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedScorecardList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedScorecardList.class); + PaginatedScorecardList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedScorecardList.class); Optional startingAfter = parsedResponse.getNext(); ScorecardsListRequest nextRequest = ScorecardsListRequest.builder() .from(request) @@ -168,12 +169,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -249,17 +247,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Scorecard.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Scorecard.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawSyncStatusClient.java b/src/main/java/com/merge/api/ats/AsyncRawSyncStatusClient.java index dbea60b99..f8a047ed8 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawSyncStatusClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawSyncStatusClient.java @@ -82,9 +82,10 @@ public CompletableFuture>> l @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedSyncStatusList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedSyncStatusList.class); + PaginatedSyncStatusList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedSyncStatusList.class); Optional startingAfter = parsedResponse.getNext(); SyncStatusListRequest nextRequest = SyncStatusListRequest.builder() .from(request) @@ -105,12 +106,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawTagsClient.java b/src/main/java/com/merge/api/ats/AsyncRawTagsClient.java index 066a73215..fbfd14eef 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawTagsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawTagsClient.java @@ -120,9 +120,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTagList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTagList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTagList.class); Optional startingAfter = parsedResponse.getNext(); TagsListRequest nextRequest = TagsListRequest.builder() .from(request) @@ -142,12 +143,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawUsersClient.java b/src/main/java/com/merge/api/ats/AsyncRawUsersClient.java index f42e93de9..189a8c8b0 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawUsersClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawUsersClient.java @@ -133,9 +133,10 @@ public CompletableFuture>> l @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedRemoteUserList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedRemoteUserList.class); + PaginatedRemoteUserList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteUserList.class); Optional startingAfter = parsedResponse.getNext(); UsersListRequest nextRequest = UsersListRequest.builder() .from(request) @@ -156,12 +157,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -233,18 +231,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteUser.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteUser.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/AsyncRawWebhookReceiversClient.java b/src/main/java/com/merge/api/ats/AsyncRawWebhookReceiversClient.java index 789da2d78..3ece36b69 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawWebhookReceiversClient.java @@ -65,19 +65,17 @@ public CompletableFuture>> list(Reque @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -131,18 +129,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), WebhookReceiver.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, WebhookReceiver.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ats/RawAccountDetailsClient.java b/src/main/java/com/merge/api/ats/RawAccountDetailsClient.java index 24d5bb03f..30803b755 100644 --- a/src/main/java/com/merge/api/ats/RawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/ats/RawAccountDetailsClient.java @@ -52,16 +52,13 @@ public MergeApiHttpResponse retrieve(RequestOptions requestOptio } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountDetails.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountDetails.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawAccountTokenClient.java b/src/main/java/com/merge/api/ats/RawAccountTokenClient.java index 8d1ea04e1..3589cd5e3 100644 --- a/src/main/java/com/merge/api/ats/RawAccountTokenClient.java +++ b/src/main/java/com/merge/api/ats/RawAccountTokenClient.java @@ -53,16 +53,13 @@ public MergeApiHttpResponse retrieve(String publicToken, RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountToken.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountToken.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawActivitiesClient.java b/src/main/java/com/merge/api/ats/RawActivitiesClient.java index 83b35924e..8c37ec550 100644 --- a/src/main/java/com/merge/api/ats/RawActivitiesClient.java +++ b/src/main/java/com/merge/api/ats/RawActivitiesClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -136,9 +134,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedActivityList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedActivityList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedActivityList.class); Optional startingAfter = parsedResponse.getNext(); ActivitiesListRequest nextRequest = ActivitiesListRequest.builder() .from(request) @@ -151,12 +150,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -185,13 +180,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); - properties.put("remote_user_id", request.getRemoteUserId()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -208,16 +200,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ActivityResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ActivityResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -281,16 +270,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Activity.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Activity.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -323,16 +309,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawApplicationsClient.java b/src/main/java/com/merge/api/ats/RawApplicationsClient.java index 02c628c7c..4c154a293 100644 --- a/src/main/java/com/merge/api/ats/RawApplicationsClient.java +++ b/src/main/java/com/merge/api/ats/RawApplicationsClient.java @@ -23,9 +23,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -150,9 +148,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedApplicationList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedApplicationList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedApplicationList.class); Optional startingAfter = parsedResponse.getNext(); ApplicationsListRequest nextRequest = ApplicationsListRequest.builder() .from(request) @@ -166,12 +165,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -204,13 +199,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); - properties.put("remote_user_id", request.getRemoteUserId()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -227,17 +219,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ApplicationResponse.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApplicationResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -293,16 +281,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Application.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Application.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -341,17 +326,10 @@ public MergeApiHttpResponse changeStageCreate( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - if (request.getJobInterviewStage().isPresent()) { - properties.put("job_interview_stage", request.getJobInterviewStage()); - } - if (request.getRemoteUserId().isPresent()) { - properties.put("remote_user_id", request.getRemoteUserId()); - } RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -368,17 +346,13 @@ public MergeApiHttpResponse changeStageCreate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ApplicationResponse.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApplicationResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -425,16 +399,13 @@ public MergeApiHttpResponse metaPostRetrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawAsyncPassthroughClient.java b/src/main/java/com/merge/api/ats/RawAsyncPassthroughClient.java index 3059d9d63..d190310a0 100644 --- a/src/main/java/com/merge/api/ats/RawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/ats/RawAsyncPassthroughClient.java @@ -66,17 +66,14 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AsyncPassthroughReciept.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughReciept.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -111,18 +108,14 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughRetrieveResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughRetrieveResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawAttachmentsClient.java b/src/main/java/com/merge/api/ats/RawAttachmentsClient.java index c640eab44..5285c83a4 100644 --- a/src/main/java/com/merge/api/ats/RawAttachmentsClient.java +++ b/src/main/java/com/merge/api/ats/RawAttachmentsClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -136,9 +134,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAttachmentList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedAttachmentList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAttachmentList.class); Optional startingAfter = parsedResponse.getNext(); AttachmentsListRequest nextRequest = AttachmentsListRequest.builder() .from(request) @@ -152,12 +151,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -186,13 +181,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); - properties.put("remote_user_id", request.getRemoteUserId()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -209,16 +201,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AttachmentResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AttachmentResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -282,16 +271,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Attachment.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Attachment.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -324,16 +310,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawAuditTrailClient.java b/src/main/java/com/merge/api/ats/RawAuditTrailClient.java index 71d09b7b0..fc2dfff27 100644 --- a/src/main/java/com/merge/api/ats/RawAuditTrailClient.java +++ b/src/main/java/com/merge/api/ats/RawAuditTrailClient.java @@ -90,9 +90,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAuditLogEventList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedAuditLogEventList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAuditLogEventList.class); Optional startingAfter = parsedResponse.getNext(); AuditTrailListRequest nextRequest = AuditTrailListRequest.builder() .from(request) @@ -106,12 +107,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawAvailableActionsClient.java b/src/main/java/com/merge/api/ats/RawAvailableActionsClient.java index 25c90497d..e89aa1a85 100644 --- a/src/main/java/com/merge/api/ats/RawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/ats/RawAvailableActionsClient.java @@ -52,16 +52,13 @@ public MergeApiHttpResponse retrieve(RequestOptions requestOpt } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AvailableActions.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AvailableActions.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawCandidatesClient.java b/src/main/java/com/merge/api/ats/RawCandidatesClient.java index 39ddae212..56aed10c5 100644 --- a/src/main/java/com/merge/api/ats/RawCandidatesClient.java +++ b/src/main/java/com/merge/api/ats/RawCandidatesClient.java @@ -24,9 +24,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -143,9 +141,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedCandidateList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedCandidateList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedCandidateList.class); Optional startingAfter = parsedResponse.getNext(); CandidatesListRequest nextRequest = CandidatesListRequest.builder() .from(request) @@ -158,12 +157,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -192,13 +187,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); - properties.put("remote_user_id", request.getRemoteUserId()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -215,16 +207,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CandidateResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CandidateResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -280,16 +269,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Candidate.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Candidate.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -319,13 +305,10 @@ public MergeApiHttpResponse partialUpdate( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); - properties.put("remote_user_id", request.getRemoteUserId()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -342,16 +325,13 @@ public MergeApiHttpResponse partialUpdate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CandidateResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CandidateResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -397,11 +377,8 @@ public MergeApiHttpResponse ignoreCreate( return new MergeApiHttpResponse<>(null, response); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -435,16 +412,13 @@ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -477,16 +451,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawDeleteAccountClient.java b/src/main/java/com/merge/api/ats/RawDeleteAccountClient.java index 1afcccdfd..33f103afb 100644 --- a/src/main/java/com/merge/api/ats/RawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/ats/RawDeleteAccountClient.java @@ -55,11 +55,8 @@ public MergeApiHttpResponse delete(RequestOptions requestOptions) { return new MergeApiHttpResponse<>(null, response); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawDepartmentsClient.java b/src/main/java/com/merge/api/ats/RawDepartmentsClient.java index aa787ef3f..f246d2a1e 100644 --- a/src/main/java/com/merge/api/ats/RawDepartmentsClient.java +++ b/src/main/java/com/merge/api/ats/RawDepartmentsClient.java @@ -113,9 +113,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedDepartmentList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedDepartmentList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedDepartmentList.class); Optional startingAfter = parsedResponse.getNext(); DepartmentsListRequest nextRequest = DepartmentsListRequest.builder() .from(request) @@ -129,12 +130,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -186,16 +183,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Department.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Department.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawEeocsClient.java b/src/main/java/com/merge/api/ats/RawEeocsClient.java index 757c5f1de..da3cd646d 100644 --- a/src/main/java/com/merge/api/ats/RawEeocsClient.java +++ b/src/main/java/com/merge/api/ats/RawEeocsClient.java @@ -129,9 +129,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedEeocList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedEeocList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedEeocList.class); Optional startingAfter = parsedResponse.getNext(); EeocsListRequest nextRequest = EeocsListRequest.builder() .from(request) @@ -144,12 +145,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -212,16 +209,13 @@ public MergeApiHttpResponse retrieve(String id, EeocsRetrieveRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Eeoc.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Eeoc.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawFieldMappingClient.java b/src/main/java/com/merge/api/ats/RawFieldMappingClient.java index 774502bcf..ad4a77b73 100644 --- a/src/main/java/com/merge/api/ats/RawFieldMappingClient.java +++ b/src/main/java/com/merge/api/ats/RawFieldMappingClient.java @@ -21,8 +21,6 @@ import com.merge.api.core.QueryStringMapper; import com.merge.api.core.RequestOptions; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -80,18 +78,14 @@ public MergeApiHttpResponse fieldMappingsRetrie } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingApiInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingApiInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -119,17 +113,10 @@ public MergeApiHttpResponse fieldMappingsCreate( request.getExcludeRemoteFieldMetadata().get(), false); } - Map properties = new HashMap<>(); - properties.put("target_field_name", request.getTargetFieldName()); - properties.put("target_field_description", request.getTargetFieldDescription()); - properties.put("remote_field_traversal_path", request.getRemoteFieldTraversalPath()); - properties.put("remote_method", request.getRemoteMethod()); - properties.put("remote_url_path", request.getRemoteUrlPath()); - properties.put("common_model_name", request.getCommonModelName()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -146,17 +133,14 @@ public MergeApiHttpResponse fieldMappingsCreate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -191,17 +175,14 @@ public MergeApiHttpResponse fieldMappingsDestroy( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -253,17 +234,14 @@ public MergeApiHttpResponse fieldMappingsPartialUp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -314,17 +292,14 @@ public MergeApiHttpResponse remoteFieldsRetrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteFieldApiResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -357,18 +332,14 @@ public MergeApiHttpResponse targetFieldsRetrieve } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), ExternalTargetFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ExternalTargetFieldApiResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawForceResyncClient.java b/src/main/java/com/merge/api/ats/RawForceResyncClient.java index d4ec4a02f..a4f5a5917 100644 --- a/src/main/java/com/merge/api/ats/RawForceResyncClient.java +++ b/src/main/java/com/merge/api/ats/RawForceResyncClient.java @@ -55,18 +55,15 @@ public MergeApiHttpResponse> syncStatusResyncCreate(RequestOpti } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawGenerateKeyClient.java b/src/main/java/com/merge/api/ats/RawGenerateKeyClient.java index 5160c6b18..9c7f62eee 100644 --- a/src/main/java/com/merge/api/ats/RawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/ats/RawGenerateKeyClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request, } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawInterviewsClient.java b/src/main/java/com/merge/api/ats/RawInterviewsClient.java index 347a49239..03ed5a205 100644 --- a/src/main/java/com/merge/api/ats/RawInterviewsClient.java +++ b/src/main/java/com/merge/api/ats/RawInterviewsClient.java @@ -21,9 +21,7 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -151,9 +149,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedScheduledInterviewList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedScheduledInterviewList.class); + PaginatedScheduledInterviewList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedScheduledInterviewList.class); Optional startingAfter = parsedResponse.getNext(); InterviewsListRequest nextRequest = InterviewsListRequest.builder() .from(request) @@ -167,12 +166,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -201,13 +196,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); - properties.put("remote_user_id", request.getRemoteUserId()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -224,17 +216,14 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ScheduledInterviewResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ScheduledInterviewResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -298,16 +287,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ScheduledInterview.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ScheduledInterview.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -340,16 +326,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawIssuesClient.java b/src/main/java/com/merge/api/ats/RawIssuesClient.java index fe32d31e7..9c0e57a77 100644 --- a/src/main/java/com/merge/api/ats/RawIssuesClient.java +++ b/src/main/java/com/merge/api/ats/RawIssuesClient.java @@ -137,9 +137,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedIssueList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedIssueList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedIssueList.class); Optional startingAfter = parsedResponse.getNext(); IssuesListRequest nextRequest = IssuesListRequest.builder() .from(request) @@ -152,12 +153,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -191,16 +188,13 @@ public MergeApiHttpResponse retrieve(String id, RequestOptions requestOpt } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Issue.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Issue.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawJobInterviewStagesClient.java b/src/main/java/com/merge/api/ats/RawJobInterviewStagesClient.java index 9cfdac863..c85c9d5a9 100644 --- a/src/main/java/com/merge/api/ats/RawJobInterviewStagesClient.java +++ b/src/main/java/com/merge/api/ats/RawJobInterviewStagesClient.java @@ -121,9 +121,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedJobInterviewStageList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedJobInterviewStageList.class); + PaginatedJobInterviewStageList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedJobInterviewStageList.class); Optional startingAfter = parsedResponse.getNext(); JobInterviewStagesListRequest nextRequest = JobInterviewStagesListRequest.builder() .from(request) @@ -137,12 +138,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -198,16 +195,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), JobInterviewStage.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, JobInterviewStage.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawJobPostingsClient.java b/src/main/java/com/merge/api/ats/RawJobPostingsClient.java index c2092e589..febcc8a96 100644 --- a/src/main/java/com/merge/api/ats/RawJobPostingsClient.java +++ b/src/main/java/com/merge/api/ats/RawJobPostingsClient.java @@ -121,9 +121,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedJobPostingList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedJobPostingList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedJobPostingList.class); Optional startingAfter = parsedResponse.getNext(); JobPostingsListRequest nextRequest = JobPostingsListRequest.builder() .from(request) @@ -137,12 +138,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -198,16 +195,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), JobPosting.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, JobPosting.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawJobsClient.java b/src/main/java/com/merge/api/ats/RawJobsClient.java index d68bd444a..5a7e83b98 100644 --- a/src/main/java/com/merge/api/ats/RawJobsClient.java +++ b/src/main/java/com/merge/api/ats/RawJobsClient.java @@ -139,9 +139,10 @@ public MergeApiHttpResponse> list(JobsListRequest reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedJobList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedJobList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedJobList.class); Optional startingAfter = parsedResponse.getNext(); JobsListRequest nextRequest = JobsListRequest.builder() .from(request) @@ -154,12 +155,8 @@ public MergeApiHttpResponse> list(JobsListRequest reques .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -222,16 +219,13 @@ public MergeApiHttpResponse retrieve(String id, JobsRetrieveRequest request } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Job.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Job.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -305,9 +299,10 @@ public MergeApiHttpResponse> screeningQues } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedScreeningQuestionList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedScreeningQuestionList.class); + PaginatedScreeningQuestionList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedScreeningQuestionList.class); Optional startingAfter = parsedResponse.getNext(); JobsScreeningQuestionsListRequest nextRequest = JobsScreeningQuestionsListRequest.builder() .from(request) @@ -321,12 +316,8 @@ public MergeApiHttpResponse> screeningQues .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawLinkTokenClient.java b/src/main/java/com/merge/api/ats/RawLinkTokenClient.java index fee541b98..8d61c068f 100644 --- a/src/main/java/com/merge/api/ats/RawLinkTokenClient.java +++ b/src/main/java/com/merge/api/ats/RawLinkTokenClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(EndUserDetailsRequest request, Req } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), LinkToken.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, LinkToken.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawLinkedAccountsClient.java b/src/main/java/com/merge/api/ats/RawLinkedAccountsClient.java index 38de4f704..a285f669f 100644 --- a/src/main/java/com/merge/api/ats/RawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/ats/RawLinkedAccountsClient.java @@ -128,9 +128,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAccountDetailsAndActionsList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedAccountDetailsAndActionsList.class); + responseBodyString, PaginatedAccountDetailsAndActionsList.class); Optional startingAfter = parsedResponse.getNext(); LinkedAccountsListRequest nextRequest = LinkedAccountsListRequest.builder() .from(request) @@ -145,12 +146,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawOffersClient.java b/src/main/java/com/merge/api/ats/RawOffersClient.java index 4e5777f10..547a0c186 100644 --- a/src/main/java/com/merge/api/ats/RawOffersClient.java +++ b/src/main/java/com/merge/api/ats/RawOffersClient.java @@ -133,9 +133,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedOfferList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedOfferList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedOfferList.class); Optional startingAfter = parsedResponse.getNext(); OffersListRequest nextRequest = OffersListRequest.builder() .from(request) @@ -148,12 +149,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -217,16 +214,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Offer.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Offer.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawOfficesClient.java b/src/main/java/com/merge/api/ats/RawOfficesClient.java index d4ce078d8..a28666d8d 100644 --- a/src/main/java/com/merge/api/ats/RawOfficesClient.java +++ b/src/main/java/com/merge/api/ats/RawOfficesClient.java @@ -113,9 +113,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedOfficeList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedOfficeList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedOfficeList.class); Optional startingAfter = parsedResponse.getNext(); OfficesListRequest nextRequest = OfficesListRequest.builder() .from(request) @@ -128,12 +129,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -185,16 +182,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Office.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Office.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawPassthroughClient.java b/src/main/java/com/merge/api/ats/RawPassthroughClient.java index 23ea82355..99a810622 100644 --- a/src/main/java/com/merge/api/ats/RawPassthroughClient.java +++ b/src/main/java/com/merge/api/ats/RawPassthroughClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(DataPassthroughRequest reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawRegenerateKeyClient.java b/src/main/java/com/merge/api/ats/RawRegenerateKeyClient.java index a8763a267..b87e8fed9 100644 --- a/src/main/java/com/merge/api/ats/RawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/ats/RawRegenerateKeyClient.java @@ -65,16 +65,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawRejectReasonsClient.java b/src/main/java/com/merge/api/ats/RawRejectReasonsClient.java index 2a0471b1d..c3d97c697 100644 --- a/src/main/java/com/merge/api/ats/RawRejectReasonsClient.java +++ b/src/main/java/com/merge/api/ats/RawRejectReasonsClient.java @@ -113,9 +113,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRejectReasonList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRejectReasonList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRejectReasonList.class); Optional startingAfter = parsedResponse.getNext(); RejectReasonsListRequest nextRequest = RejectReasonsListRequest.builder() .from(request) @@ -129,12 +130,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -186,16 +183,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RejectReason.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RejectReason.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawScopesClient.java b/src/main/java/com/merge/api/ats/RawScopesClient.java index 38e30f22e..e2a7ef271 100644 --- a/src/main/java/com/merge/api/ats/RawScopesClient.java +++ b/src/main/java/com/merge/api/ats/RawScopesClient.java @@ -56,17 +56,13 @@ public MergeApiHttpResponse defaultScopesRetrieve(RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -99,17 +95,13 @@ public MergeApiHttpResponse linkedAccountScopesRetrieve(Req } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -152,17 +144,13 @@ public MergeApiHttpResponse linkedAccountScopesCreate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawScorecardsClient.java b/src/main/java/com/merge/api/ats/RawScorecardsClient.java index 7dab6d7f0..df5bbfaee 100644 --- a/src/main/java/com/merge/api/ats/RawScorecardsClient.java +++ b/src/main/java/com/merge/api/ats/RawScorecardsClient.java @@ -137,9 +137,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedScorecardList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedScorecardList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedScorecardList.class); Optional startingAfter = parsedResponse.getNext(); ScorecardsListRequest nextRequest = ScorecardsListRequest.builder() .from(request) @@ -152,12 +153,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -221,16 +218,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Scorecard.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Scorecard.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawSyncStatusClient.java b/src/main/java/com/merge/api/ats/RawSyncStatusClient.java index 561a6145a..a0fe8e967 100644 --- a/src/main/java/com/merge/api/ats/RawSyncStatusClient.java +++ b/src/main/java/com/merge/api/ats/RawSyncStatusClient.java @@ -74,9 +74,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedSyncStatusList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedSyncStatusList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedSyncStatusList.class); Optional startingAfter = parsedResponse.getNext(); SyncStatusListRequest nextRequest = SyncStatusListRequest.builder() .from(request) @@ -90,12 +91,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawTagsClient.java b/src/main/java/com/merge/api/ats/RawTagsClient.java index 0aeb7bda1..43784f72c 100644 --- a/src/main/java/com/merge/api/ats/RawTagsClient.java +++ b/src/main/java/com/merge/api/ats/RawTagsClient.java @@ -111,9 +111,10 @@ public MergeApiHttpResponse> list(TagsListRequest reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTagList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTagList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTagList.class); Optional startingAfter = parsedResponse.getNext(); TagsListRequest nextRequest = TagsListRequest.builder() .from(request) @@ -126,12 +127,8 @@ public MergeApiHttpResponse> list(TagsListRequest reques .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawUsersClient.java b/src/main/java/com/merge/api/ats/RawUsersClient.java index 19b0f7a85..4179b2daf 100644 --- a/src/main/java/com/merge/api/ats/RawUsersClient.java +++ b/src/main/java/com/merge/api/ats/RawUsersClient.java @@ -125,9 +125,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteUserList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteUserList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteUserList.class); Optional startingAfter = parsedResponse.getNext(); UsersListRequest nextRequest = UsersListRequest.builder() .from(request) @@ -141,12 +142,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -206,16 +203,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteUser.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteUser.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/RawWebhookReceiversClient.java b/src/main/java/com/merge/api/ats/RawWebhookReceiversClient.java index 9d5248ce5..45b3fde9a 100644 --- a/src/main/java/com/merge/api/ats/RawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/ats/RawWebhookReceiversClient.java @@ -58,18 +58,15 @@ public MergeApiHttpResponse> list(RequestOptions requestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -110,16 +107,13 @@ public MergeApiHttpResponse create(WebhookReceiverRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), WebhookReceiver.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, WebhookReceiver.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ats/types/RemoteData.java b/src/main/java/com/merge/api/ats/types/RemoteData.java index 897d6f542..0b380761f 100644 --- a/src/main/java/com/merge/api/ats/types/RemoteData.java +++ b/src/main/java/com/merge/api/ats/types/RemoteData.java @@ -42,6 +42,9 @@ public String getPath() { return path; } + /** + * @return The data returned from the third-party for this object in its original, unnormalized format. + */ @JsonProperty("data") public Optional getData() { return data; @@ -88,6 +91,9 @@ public interface PathStage { public interface _FinalStage { RemoteData build(); + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ */ _FinalStage data(Optional data); _FinalStage data(JsonNode data); @@ -123,12 +129,19 @@ public _FinalStage path(@NotNull String path) { return this; } + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage data(JsonNode data) { this.data = Optional.ofNullable(data); return this; } + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ */ @java.lang.Override @JsonSetter(value = "data", nulls = Nulls.SKIP) public _FinalStage data(Optional data) { diff --git a/src/main/java/com/merge/api/core/ApiError.java b/src/main/java/com/merge/api/core/ApiError.java index 355ccf22a..84b080b0b 100644 --- a/src/main/java/com/merge/api/core/ApiError.java +++ b/src/main/java/com/merge/api/core/ApiError.java @@ -65,8 +65,9 @@ public Map> headers() { return this.headers; } - @java.lang.Override + @Override public String toString() { - return "ApiError{" + "message: " + getMessage() + ", statusCode: " + statusCode + ", body: " + body + "}"; + return "ApiError{" + "message: " + getMessage() + ", statusCode: " + statusCode + ", body: " + + ObjectMappers.stringify(body) + "}"; } } diff --git a/src/main/java/com/merge/api/core/AsyncCustomPager.java b/src/main/java/com/merge/api/core/AsyncCustomPager.java new file mode 100644 index 000000000..270606055 --- /dev/null +++ b/src/main/java/com/merge/api/core/AsyncCustomPager.java @@ -0,0 +1,164 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.core; + +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionStage; + +/** + * Skeleton implementation for custom asynchronous bidirectional pagination. + * + * THIS CLASS MUST BE IMPLEMENTED BY THE USER. + * + * This file is added to .fernignore and will not be regenerated. + * Replace this skeleton implementation with your custom async pagination logic + * that handles your API's specific pagination structure (e.g., HATEOAS links). + * + * Example implementation for HATEOAS-style async pagination: + *
{@code
+ * public class AsyncCustomPager implements BiDirectionalPage {
+ *     private final List items;
+ *     private final String nextUrl;
+ *     private final String previousUrl;
+ *     private final AsyncHttpClient client;
+ *
+ *     public AsyncCustomPager(Response response, AsyncHttpClient client, ...) {
+ *         this.items = response.getData();
+ *         this.nextUrl = response.getLinks().getNext();
+ *         this.previousUrl = response.getLinks().getPrevious();
+ *         // ... store other needed context
+ *     }
+ *
+ *     @Override
+ *     public boolean hasNext() {
+ *         return nextUrl != null;
+ *     }
+ *
+ *     @Override
+ *     public CompletableFuture> nextPageAsync() {
+ *         if (!hasNext()) {
+ *             CompletableFuture> future = new CompletableFuture<>();
+ *             future.completeExceptionally(new NoSuchElementException("No next page available"));
+ *             return future;
+ *         }
+ *         // Make async HTTP request to nextUrl
+ *         return client.getAsync(nextUrl)
+ *             .thenApply(response -> new AsyncCustomPager<>(response, client, ...));
+ *     }
+ *
+ *     // ... implement other methods
+ * }
+ * }
+ * + * @param The type of items in the page + */ +public class AsyncCustomPager implements BiDirectionalPage { + + /** + * Create an AsyncCustomPager from an initial response. + * + * @param initialResponse The first page response from the API + * @param client The async HTTP client to use for subsequent requests + * @param requestOptions Request options for authentication, headers, etc. + * @return A CompletableFuture containing the new AsyncCustomPager instance + */ + public static CompletableFuture> createAsync( + Object initialResponse, okhttp3.OkHttpClient client, Object requestOptions) { + throw new UnsupportedOperationException("AsyncCustomPager must be implemented. " + + "Please implement this class in core/AsyncCustomPager.java to define your async pagination logic. " + + "This file has been added to .fernignore and will not be overwritten. " + + "See the class documentation for implementation examples."); + } + + @Override + public boolean hasNext() { + throw new UnsupportedOperationException("AsyncCustomPager.hasNext() must be implemented. " + + "This method should return true if a next page is available."); + } + + @Override + public boolean hasPrevious() { + throw new UnsupportedOperationException("AsyncCustomPager.hasPrevious() must be implemented. " + + "This method should return true if a previous page is available."); + } + + /** + * Asynchronously fetch the next page. + * + * @return A CompletableFuture that completes with the next page + * @throws java.util.NoSuchElementException if no next page exists (wrapped in CompletableFuture) + */ + public CompletableFuture> nextPageAsync() { + CompletableFuture> future = new CompletableFuture<>(); + future.completeExceptionally( + new UnsupportedOperationException("AsyncCustomPager.nextPageAsync() must be implemented. " + + "This method should asynchronously fetch and return the next page of results.")); + return future; + } + + /** + * Asynchronously fetch the previous page. + * + * @return A CompletableFuture that completes with the previous page + * @throws java.util.NoSuchElementException if no previous page exists (wrapped in CompletableFuture) + */ + public CompletableFuture> previousPageAsync() { + CompletableFuture> future = new CompletableFuture<>(); + future.completeExceptionally( + new UnsupportedOperationException("AsyncCustomPager.previousPageAsync() must be implemented. " + + "This method should asynchronously fetch and return the previous page of results.")); + return future; + } + + @Override + public BiDirectionalPage nextPage() throws IOException { + throw new UnsupportedOperationException("AsyncCustomPager.nextPage() must be implemented. " + + "Consider using nextPageAsync() for async operations, or implement synchronous blocking version."); + } + + @Override + public BiDirectionalPage previousPage() throws IOException { + throw new UnsupportedOperationException( + "AsyncCustomPager.previousPage() must be implemented. " + + "Consider using previousPageAsync() for async operations, or implement synchronous blocking version."); + } + + @Override + public List getItems() { + throw new UnsupportedOperationException("AsyncCustomPager.getItems() must be implemented. " + + "This method should return the items in the current page."); + } + + @Override + public Optional getResponse() { + throw new UnsupportedOperationException("AsyncCustomPager.getResponse() must be implemented. " + + "This method should return the full response object for accessing pagination metadata."); + } + + /** + * Asynchronously iterate through all pages starting from current. + * Returns a CompletableFuture that completes with all items from all pages. + * + * @return CompletableFuture containing all items across all pages + */ + public CompletableFuture> getAllItemsAsync() { + throw new UnsupportedOperationException("AsyncCustomPager.getAllItemsAsync() must be implemented. " + + "This method should asynchronously fetch all pages and return all items."); + } + + /** + * Process each page asynchronously as it arrives. + * + * @param pageProcessor Function to process each page + * @return CompletableFuture that completes when all pages are processed + */ + public CompletableFuture forEachPageAsync( + java.util.function.Function, CompletionStage> pageProcessor) { + throw new UnsupportedOperationException("AsyncCustomPager.forEachPageAsync() must be implemented. " + + "This method should asynchronously process each page with the given function."); + } +} diff --git a/src/main/java/com/merge/api/core/BiDirectionalPage.java b/src/main/java/com/merge/api/core/BiDirectionalPage.java new file mode 100644 index 000000000..21482939b --- /dev/null +++ b/src/main/java/com/merge/api/core/BiDirectionalPage.java @@ -0,0 +1,60 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.core; + +import java.util.List; + +/** + * Interface for pages that support bidirectional pagination (both forward and backward navigation). + * This is used for custom pagination scenarios where the API provides both next and previous page links. + * + * @param The type of items in the page + */ +public interface BiDirectionalPage { + /** + * Returns whether there is a next page available. + * + * @return true if next page exists and can be fetched + */ + boolean hasNext(); + + /** + * Returns whether there is a previous page available. + * + * @return true if previous page exists and can be fetched + */ + boolean hasPrevious(); + + /** + * Fetches and returns the next page. + * + * @return the next page + * @throws java.util.NoSuchElementException if no next page exists + * @throws java.io.IOException if the HTTP request fails + */ + BiDirectionalPage nextPage() throws java.io.IOException; + + /** + * Fetches and returns the previous page. + * + * @return the previous page + * @throws java.util.NoSuchElementException if no previous page exists + * @throws java.io.IOException if the HTTP request fails + */ + BiDirectionalPage previousPage() throws java.io.IOException; + + /** + * Returns the items in the current page. + * + * @return list of items in this page + */ + List getItems(); + + /** + * Returns the full response object for accessing pagination metadata. + * + * @return Optional containing the response, or empty if unavailable + */ + java.util.Optional getResponse(); +} diff --git a/src/main/java/com/merge/api/core/ClientOptions.java b/src/main/java/com/merge/api/core/ClientOptions.java index 430519cf1..d94799fb3 100644 --- a/src/main/java/com/merge/api/core/ClientOptions.java +++ b/src/main/java/com/merge/api/core/ClientOptions.java @@ -21,18 +21,20 @@ public final class ClientOptions { private final int timeout; + private final int maxRetries; + private ClientOptions( Environment environment, Map headers, Map> headerSuppliers, OkHttpClient httpClient, - int timeout) { + int timeout, + int maxRetries) { this.environment = environment; this.headers = new HashMap<>(); this.headers.putAll(headers); this.headers.putAll(new HashMap() { { - put("User-Agent", "dev.merge:merge-java-client/5.0.1"); put("X-Fern-Language", "JAVA"); put("X-Fern-SDK-Name", "com.merge.fern:api-sdk"); put("X-Fern-SDK-Version", "5.0.1"); @@ -41,6 +43,7 @@ private ClientOptions( this.headerSuppliers = headerSuppliers; this.httpClient = httpClient; this.timeout = timeout; + this.maxRetries = maxRetries; } public Environment environment() { @@ -82,6 +85,10 @@ public OkHttpClient httpClientWithTimeout(RequestOptions requestOptions) { .build(); } + public int maxRetries() { + return this.maxRetries; + } + public static Builder builder() { return new Builder(); } @@ -155,7 +162,7 @@ public ClientOptions build() { .readTimeout(0, TimeUnit.SECONDS)); } else { httpClientBuilder - .callTimeout(this.timeout.orElse(60), TimeUnit.SECONDS) + .callTimeout(this.timeout.orElse(120), TimeUnit.SECONDS) .connectTimeout(0, TimeUnit.SECONDS) .writeTimeout(0, TimeUnit.SECONDS) .readTimeout(0, TimeUnit.SECONDS) @@ -165,7 +172,8 @@ public ClientOptions build() { this.httpClient = httpClientBuilder.build(); this.timeout = Optional.of(httpClient.callTimeoutMillis() / 1000); - return new ClientOptions(environment, headers, headerSuppliers, httpClient, this.timeout.get()); + return new ClientOptions( + environment, headers, headerSuppliers, httpClient, this.timeout.get(), this.maxRetries); } /** diff --git a/src/main/java/com/merge/api/core/CustomPager.java b/src/main/java/com/merge/api/core/CustomPager.java new file mode 100644 index 000000000..1a2309dce --- /dev/null +++ b/src/main/java/com/merge/api/core/CustomPager.java @@ -0,0 +1,117 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.core; + +import java.io.IOException; +import java.util.Iterator; +import java.util.List; +import java.util.Optional; + +/** + * Skeleton implementation for custom bidirectional pagination. + * + * THIS CLASS MUST BE IMPLEMENTED BY THE USER. + * + * This file is added to .fernignore and will not be regenerated. + * Replace this skeleton implementation with your custom pagination logic + * that handles your API's specific pagination structure (e.g., HATEOAS links). + * + * Example implementation for HATEOAS-style pagination: + *
{@code
+ * public class CustomPager implements BiDirectionalPage, Iterable {
+ *     private final List items;
+ *     private final String nextUrl;
+ *     private final String previousUrl;
+ *     private final OkHttpClient client;
+ *     private final TypeReference> responseType;
+ *
+ *     public CustomPager(Response response, OkHttpClient client, ...) {
+ *         this.items = response.getData();
+ *         this.nextUrl = response.getLinks().getNext();
+ *         this.previousUrl = response.getLinks().getPrevious();
+ *         // ... store other needed context
+ *     }
+ *
+ *     @Override
+ *     public boolean hasNext() {
+ *         return nextUrl != null;
+ *     }
+ *
+ *     @Override
+ *     public CustomPager nextPage() throws IOException {
+ *         if (!hasNext()) {
+ *             throw new NoSuchElementException("No next page available");
+ *         }
+ *         // Make HTTP request to nextUrl
+ *         // Parse response
+ *         // Return new CustomPager instance
+ *     }
+ *
+ *     // ... implement other methods
+ * }
+ * }
+ * + * @param The type of items in the page + */ +public class CustomPager implements BiDirectionalPage, Iterable { + + /** + * Create a CustomPager from an initial response. + * + * @param initialResponse The first page response from the API + * @param client The HTTP client to use for subsequent requests + * @param requestOptions Request options for authentication, headers, etc. + * @return A new CustomPager instance + * @throws IOException if the request fails + */ + public static CustomPager create(Object initialResponse, okhttp3.OkHttpClient client, Object requestOptions) + throws IOException { + throw new UnsupportedOperationException("CustomPager must be implemented. " + + "Please implement this class in core/CustomPager.java to define your pagination logic. " + + "This file has been added to .fernignore and will not be overwritten. " + + "See the class documentation for implementation examples."); + } + + @Override + public boolean hasNext() { + throw new UnsupportedOperationException("CustomPager.hasNext() must be implemented. " + + "This method should return true if a next page is available."); + } + + @Override + public boolean hasPrevious() { + throw new UnsupportedOperationException("CustomPager.hasPrevious() must be implemented. " + + "This method should return true if a previous page is available."); + } + + @Override + public BiDirectionalPage nextPage() throws IOException { + throw new UnsupportedOperationException("CustomPager.nextPage() must be implemented. " + + "This method should fetch and return the next page of results."); + } + + @Override + public BiDirectionalPage previousPage() throws IOException { + throw new UnsupportedOperationException("CustomPager.previousPage() must be implemented. " + + "This method should fetch and return the previous page of results."); + } + + @Override + public List getItems() { + throw new UnsupportedOperationException("CustomPager.getItems() must be implemented. " + + "This method should return the items in the current page."); + } + + @Override + public Optional getResponse() { + throw new UnsupportedOperationException("CustomPager.getResponse() must be implemented. " + + "This method should return the full response object for accessing pagination metadata."); + } + + @Override + public Iterator iterator() { + throw new UnsupportedOperationException("CustomPager.iterator() must be implemented. " + + "This method should return an iterator that traverses all items across all pages."); + } +} diff --git a/src/main/java/com/merge/api/core/NullableNonemptyFilter.java b/src/main/java/com/merge/api/core/NullableNonemptyFilter.java index 493a1abee..3267ec2cc 100644 --- a/src/main/java/com/merge/api/core/NullableNonemptyFilter.java +++ b/src/main/java/com/merge/api/core/NullableNonemptyFilter.java @@ -14,6 +14,9 @@ public boolean equals(Object o) { } private boolean isOptionalEmpty(Object o) { - return o instanceof Optional && !((Optional) o).isPresent(); + if (o instanceof Optional) { + return !((Optional) o).isPresent(); + } + return false; } } diff --git a/src/main/java/com/merge/api/core/ObjectMappers.java b/src/main/java/com/merge/api/core/ObjectMappers.java index 8b2d5fc68..1287ccb7d 100644 --- a/src/main/java/com/merge/api/core/ObjectMappers.java +++ b/src/main/java/com/merge/api/core/ObjectMappers.java @@ -4,6 +4,7 @@ package com.merge.api.core; import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; @@ -33,4 +34,12 @@ public static String stringify(Object o) { return o.getClass().getName() + "@" + Integer.toHexString(o.hashCode()); } } + + public static Object parseErrorBody(String responseBodyString) { + try { + return JSON_MAPPER.readValue(responseBodyString, Object.class); + } catch (JsonProcessingException ignored) { + return responseBodyString; + } + } } diff --git a/src/main/java/com/merge/api/core/RetryInterceptor.java b/src/main/java/com/merge/api/core/RetryInterceptor.java index fa040d5a2..ef50843a4 100644 --- a/src/main/java/com/merge/api/core/RetryInterceptor.java +++ b/src/main/java/com/merge/api/core/RetryInterceptor.java @@ -5,6 +5,9 @@ import java.io.IOException; import java.time.Duration; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; import java.util.Optional; import java.util.Random; import okhttp3.Interceptor; @@ -12,7 +15,10 @@ public class RetryInterceptor implements Interceptor { - private static final Duration ONE_SECOND = Duration.ofSeconds(1); + private static final Duration INITIAL_RETRY_DELAY = Duration.ofMillis(1000); + private static final Duration MAX_RETRY_DELAY = Duration.ofMillis(60000); + private static final double JITTER_FACTOR = 0.2; + private final ExponentialBackoff backoff; private final Random random = new Random(); @@ -32,7 +38,7 @@ public Response intercept(Chain chain) throws IOException { } private Response retryChain(Response response, Chain chain) throws IOException { - Optional nextBackoff = this.backoff.nextBackoff(); + Optional nextBackoff = this.backoff.nextBackoff(response); while (nextBackoff.isPresent()) { try { Thread.sleep(nextBackoff.get().toMillis()); @@ -42,7 +48,7 @@ private Response retryChain(Response response, Chain chain) throws IOException { response.close(); response = chain.proceed(chain.request()); if (shouldRetry(response.code())) { - nextBackoff = this.backoff.nextBackoff(); + nextBackoff = this.backoff.nextBackoff(response); } else { return response; } @@ -51,6 +57,102 @@ private Response retryChain(Response response, Chain chain) throws IOException { return response; } + /** + * Calculates the retry delay from response headers, with fallback to exponential backoff. + * Priority: Retry-After > X-RateLimit-Reset > Exponential Backoff + */ + private Duration getRetryDelayFromHeaders(Response response, int retryAttempt) { + // Check for Retry-After header first (RFC 7231), with no jitter + String retryAfter = response.header("Retry-After"); + if (retryAfter != null) { + // Parse as number of seconds... + Optional secondsDelay = tryParseLong(retryAfter) + .map(seconds -> seconds * 1000) + .filter(delayMs -> delayMs > 0) + .map(delayMs -> Math.min(delayMs, MAX_RETRY_DELAY.toMillis())) + .map(Duration::ofMillis); + if (secondsDelay.isPresent()) { + return secondsDelay.get(); + } + + // ...or as an HTTP date; both are valid + Optional dateDelay = tryParseHttpDate(retryAfter) + .map(resetTime -> resetTime.toInstant().toEpochMilli() - System.currentTimeMillis()) + .filter(delayMs -> delayMs > 0) + .map(delayMs -> Math.min(delayMs, MAX_RETRY_DELAY.toMillis())) + .map(Duration::ofMillis); + if (dateDelay.isPresent()) { + return dateDelay.get(); + } + } + + // Then check for industry-standard X-RateLimit-Reset header, with positive jitter + String rateLimitReset = response.header("X-RateLimit-Reset"); + if (rateLimitReset != null) { + // Assume Unix timestamp in epoch seconds + Optional rateLimitDelay = tryParseLong(rateLimitReset) + .map(resetTimeSeconds -> (resetTimeSeconds * 1000) - System.currentTimeMillis()) + .filter(delayMs -> delayMs > 0) + .map(delayMs -> Math.min(delayMs, MAX_RETRY_DELAY.toMillis())) + .map(this::addPositiveJitter) + .map(Duration::ofMillis); + if (rateLimitDelay.isPresent()) { + return rateLimitDelay.get(); + } + } + + // Fall back to exponential backoff, with symmetric jitter + long baseDelay = INITIAL_RETRY_DELAY.toMillis() * (1L << retryAttempt); // 2^retryAttempt + long cappedDelay = Math.min(baseDelay, MAX_RETRY_DELAY.toMillis()); + return Duration.ofMillis(addSymmetricJitter(cappedDelay)); + } + + /** + * Attempts to parse a string as a long, returning empty Optional on failure. + */ + private Optional tryParseLong(String value) { + if (value == null) { + return Optional.empty(); + } + try { + return Optional.of(Long.parseLong(value)); + } catch (NumberFormatException e) { + return Optional.empty(); + } + } + + /** + * Attempts to parse a string as an HTTP date (RFC 1123), returning empty Optional on failure. + */ + private Optional tryParseHttpDate(String value) { + if (value == null) { + return Optional.empty(); + } + try { + return Optional.of(ZonedDateTime.parse(value, DateTimeFormatter.RFC_1123_DATE_TIME)); + } catch (DateTimeParseException e) { + return Optional.empty(); + } + } + + /** + * Adds positive jitter (100-120% of original value) to prevent thundering herd. + * Used for X-RateLimit-Reset header delays. + */ + private long addPositiveJitter(long delayMs) { + double jitterMultiplier = 1.0 + (random.nextDouble() * JITTER_FACTOR); + return (long) (delayMs * jitterMultiplier); + } + + /** + * Adds symmetric jitter (90-110% of original value) to prevent thundering herd. + * Used for exponential backoff delays. + */ + private long addSymmetricJitter(long delayMs) { + double jitterMultiplier = 1.0 + ((random.nextDouble() - 0.5) * JITTER_FACTOR); + return (long) (delayMs * jitterMultiplier); + } + private static boolean shouldRetry(int statusCode) { return statusCode == 408 || statusCode == 429 || statusCode >= 500; } @@ -65,14 +167,14 @@ private final class ExponentialBackoff { this.maxNumRetries = maxNumRetries; } - public Optional nextBackoff() { - retryNumber += 1; - if (retryNumber > maxNumRetries) { + public Optional nextBackoff(Response response) { + if (retryNumber >= maxNumRetries) { return Optional.empty(); } - int upperBound = (int) Math.pow(2, retryNumber); - return Optional.of(ONE_SECOND.multipliedBy(random.nextInt(upperBound))); + Duration delay = getRetryDelayFromHeaders(response, retryNumber); + retryNumber += 1; + return Optional.of(delay); } } } diff --git a/src/main/java/com/merge/api/core/Stream.java b/src/main/java/com/merge/api/core/Stream.java index 219702457..cbdaf65de 100644 --- a/src/main/java/com/merge/api/core/Stream.java +++ b/src/main/java/com/merge/api/core/Stream.java @@ -174,8 +174,8 @@ private final class SSEIterator implements Iterator { private T nextItem; private boolean hasNextItem = false; private boolean endOfStream = false; - private StringBuilder buffer = new StringBuilder(); - private boolean prefixSeen = false; + private StringBuilder eventDataBuffer = new StringBuilder(); + private String currentEventType = null; private SSEIterator() { if (sseReader != null && !isStreamClosed()) { @@ -223,39 +223,69 @@ private boolean readNextMessage() { try { while (sseScanner.hasNextLine()) { - String chunk = sseScanner.nextLine(); - buffer.append(chunk).append(NEWLINE); - - int terminatorIndex; - while ((terminatorIndex = buffer.indexOf(messageTerminator)) >= 0) { - String line = buffer.substring(0, terminatorIndex + messageTerminator.length()); - buffer.delete(0, terminatorIndex + messageTerminator.length()); - - line = line.trim(); - if (line.isEmpty()) { - continue; + String line = sseScanner.nextLine(); + + if (line.trim().isEmpty()) { + if (eventDataBuffer.length() > 0) { + try { + nextItem = ObjectMappers.JSON_MAPPER.readValue(eventDataBuffer.toString(), valueType); + hasNextItem = true; + eventDataBuffer.setLength(0); + currentEventType = null; + return true; + } catch (Exception parseEx) { + System.err.println("Failed to parse SSE event: " + parseEx.getMessage()); + eventDataBuffer.setLength(0); + currentEventType = null; + continue; + } } + continue; + } - if (!prefixSeen && line.startsWith(DATA_PREFIX)) { - prefixSeen = true; - line = line.substring(DATA_PREFIX.length()).trim(); - } else if (!prefixSeen) { - continue; + if (line.startsWith(DATA_PREFIX)) { + String dataContent = line.substring(DATA_PREFIX.length()); + if (dataContent.startsWith(" ")) { + dataContent = dataContent.substring(1); } - if (streamTerminator != null && line.contains(streamTerminator)) { + if (eventDataBuffer.length() == 0 + && streamTerminator != null + && dataContent.trim().equals(streamTerminator)) { endOfStream = true; return false; } - try { - nextItem = ObjectMappers.JSON_MAPPER.readValue(line, valueType); - hasNextItem = true; - prefixSeen = false; - return true; - } catch (Exception parseEx) { - continue; + if (eventDataBuffer.length() > 0) { + eventDataBuffer.append('\n'); + } + eventDataBuffer.append(dataContent); + } else if (line.startsWith("event:")) { + String eventValue = line.length() > 6 ? line.substring(6) : ""; + if (eventValue.startsWith(" ")) { + eventValue = eventValue.substring(1); } + currentEventType = eventValue; + } else if (line.startsWith("id:")) { + // Event ID field (ignored) + } else if (line.startsWith("retry:")) { + // Retry field (ignored) + } else if (line.startsWith(":")) { + // Comment line (ignored) + } + } + + if (eventDataBuffer.length() > 0) { + try { + nextItem = ObjectMappers.JSON_MAPPER.readValue(eventDataBuffer.toString(), valueType); + hasNextItem = true; + eventDataBuffer.setLength(0); + currentEventType = null; + return true; + } catch (Exception parseEx) { + System.err.println("Failed to parse final SSE event: " + parseEx.getMessage()); + eventDataBuffer.setLength(0); + currentEventType = null; } } diff --git a/src/main/java/com/merge/api/crm/AsyncRawAccountDetailsClient.java b/src/main/java/com/merge/api/crm/AsyncRawAccountDetailsClient.java index 6d36ff9c6..d83722d60 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawAccountDetailsClient.java @@ -59,18 +59,16 @@ public CompletableFuture> retrieve(RequestO @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountDetails.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountDetails.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawAccountTokenClient.java b/src/main/java/com/merge/api/crm/AsyncRawAccountTokenClient.java index 851535bc3..eb3be4fd8 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawAccountTokenClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawAccountTokenClient.java @@ -61,18 +61,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountToken.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountToken.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawAccountsClient.java b/src/main/java/com/merge/api/crm/AsyncRawAccountsClient.java index c51dff5e6..fd6dd47da 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawAccountsClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawAccountsClient.java @@ -25,9 +25,7 @@ import com.merge.api.crm.types.RemoteFieldClass; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -151,9 +149,10 @@ public CompletableFuture>> list @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAccountList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedAccountList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAccountList.class); Optional startingAfter = parsedResponse.getNext(); AccountsListRequest nextRequest = AccountsListRequest.builder() .from(request) @@ -174,12 +173,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -217,12 +213,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -242,18 +236,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CrmAccountResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CrmAccountResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -328,17 +320,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Account.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Account.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -378,12 +368,10 @@ public CompletableFuture> partialUpdate QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -403,18 +391,16 @@ public CompletableFuture> partialUpdate @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CrmAccountResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CrmAccountResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -461,18 +447,15 @@ public CompletableFuture> metaPatchRetrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -517,18 +500,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -627,9 +607,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); AccountsRemoteFieldClassesListRequest nextRequest = AccountsRemoteFieldClassesListRequest.builder() @@ -652,12 +633,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawAssociationTypesClient.java b/src/main/java/com/merge/api/crm/AsyncRawAssociationTypesClient.java index beab1a28b..8472fa72e 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawAssociationTypesClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawAssociationTypesClient.java @@ -21,9 +21,7 @@ import com.merge.api.crm.types.PaginatedAssociationTypeList; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -142,9 +140,10 @@ public AsyncRawAssociationTypesClient(ClientOptions clientOptions) { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAssociationTypeList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedAssociationTypeList.class); + responseBodyString, PaginatedAssociationTypeList.class); Optional startingAfter = parsedResponse.getNext(); CustomObjectClassesAssociationTypesListRequest nextRequest = CustomObjectClassesAssociationTypesListRequest.builder() @@ -168,12 +167,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -218,12 +214,10 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -243,19 +237,17 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), CrmAssociationTypeResponse.class), + responseBodyString, CrmAssociationTypeResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -333,18 +325,16 @@ public CompletableFuture> customObjectClas @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AssociationType.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AssociationType.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -376,7 +366,8 @@ public CompletableFuture> customObjectClasses .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) - .addPathSegments("association-types/meta/post") + .addPathSegments("association-types/meta") + .addPathSegments("post") .build(); Request okhttpRequest = new Request.Builder() .url(httpUrl) @@ -393,18 +384,15 @@ public CompletableFuture> customObjectClasses @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawAssociationsClient.java b/src/main/java/com/merge/api/crm/AsyncRawAssociationsClient.java index 08b90b43d..6586aa593 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawAssociationsClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawAssociationsClient.java @@ -150,9 +150,10 @@ public AsyncRawAssociationsClient(ClientOptions clientOptions) { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedAssociationList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedAssociationList.class); + PaginatedAssociationList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAssociationList.class); Optional startingAfter = parsedResponse.getNext(); CustomObjectClassesCustomObjectsAssociationsListRequest nextRequest = CustomObjectClassesCustomObjectsAssociationsListRequest.builder() @@ -178,12 +179,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -275,18 +273,15 @@ public CompletableFuture> customObjectClassesC @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Association.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Association.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawAsyncPassthroughClient.java b/src/main/java/com/merge/api/crm/AsyncRawAsyncPassthroughClient.java index d0fc0b252..0b3167f54 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawAsyncPassthroughClient.java @@ -73,19 +73,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughReciept.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughReciept.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -133,19 +130,17 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughRetrieveResponse.class), + responseBodyString, AsyncPassthroughRetrieveResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawAuditTrailClient.java b/src/main/java/com/merge/api/crm/AsyncRawAuditTrailClient.java index 53b38fa9f..260c0a47f 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawAuditTrailClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawAuditTrailClient.java @@ -99,9 +99,10 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAuditLogEventList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedAuditLogEventList.class); + responseBodyString, PaginatedAuditLogEventList.class); Optional startingAfter = parsedResponse.getNext(); AuditTrailListRequest nextRequest = AuditTrailListRequest.builder() .from(request) @@ -122,12 +123,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawAvailableActionsClient.java b/src/main/java/com/merge/api/crm/AsyncRawAvailableActionsClient.java index 69c563c6e..64634db11 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawAvailableActionsClient.java @@ -59,18 +59,16 @@ public CompletableFuture> retrieve(Reques @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AvailableActions.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AvailableActions.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawContactsClient.java b/src/main/java/com/merge/api/crm/AsyncRawContactsClient.java index d935f6c05..433cfa2d3 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawContactsClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawContactsClient.java @@ -27,9 +27,7 @@ import com.merge.api.crm.types.RemoteFieldClass; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -157,9 +155,10 @@ public CompletableFuture>> list @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedContactList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedContactList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedContactList.class); Optional startingAfter = parsedResponse.getNext(); ContactsListRequest nextRequest = ContactsListRequest.builder() .from(request) @@ -180,12 +179,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -223,12 +219,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -248,18 +242,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CrmContactResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CrmContactResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -334,17 +326,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Contact.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Contact.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -384,12 +374,10 @@ public CompletableFuture> partialUpdate QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -409,18 +397,16 @@ public CompletableFuture> partialUpdate @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CrmContactResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CrmContactResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -480,11 +466,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO return; } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -531,18 +515,15 @@ public CompletableFuture> metaPatchRetrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -587,18 +568,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -697,9 +675,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); ContactsRemoteFieldClassesListRequest nextRequest = ContactsRemoteFieldClassesListRequest.builder() @@ -722,12 +701,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawCustomObjectClassesClient.java b/src/main/java/com/merge/api/crm/AsyncRawCustomObjectClassesClient.java index 68b136500..d5e12a6bd 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawCustomObjectClassesClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawCustomObjectClassesClient.java @@ -127,9 +127,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); CustomObjectClassesListRequest nextRequest = CustomObjectClassesListRequest.builder() .from(request) @@ -151,12 +152,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -225,18 +223,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CustomObjectClass.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CustomObjectClass.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawCustomObjectsClient.java b/src/main/java/com/merge/api/crm/AsyncRawCustomObjectsClient.java index 2264b659a..402d11ab6 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawCustomObjectsClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawCustomObjectsClient.java @@ -24,9 +24,7 @@ import com.merge.api.crm.types.RemoteFieldClass; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -148,9 +146,10 @@ public AsyncRawCustomObjectsClient(ClientOptions clientOptions) { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedCustomObjectList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedCustomObjectList.class); + responseBodyString, PaginatedCustomObjectList.class); Optional startingAfter = parsedResponse.getNext(); CustomObjectClassesCustomObjectsListRequest nextRequest = CustomObjectClassesCustomObjectsListRequest.builder() @@ -173,12 +172,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -219,12 +215,10 @@ public CompletableFuture> customOb QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -244,19 +238,16 @@ public CompletableFuture> customOb @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), CrmCustomObjectResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CrmCustomObjectResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -337,18 +328,15 @@ public CompletableFuture> customObjectClasses @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CustomObject.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CustomObject.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -380,7 +368,8 @@ public CompletableFuture> customObjectClasses .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) - .addPathSegments("custom-objects/meta/post") + .addPathSegments("custom-objects/meta") + .addPathSegments("post") .build(); Request okhttpRequest = new Request.Builder() .url(httpUrl) @@ -397,18 +386,15 @@ public CompletableFuture> customObjectClasses @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -512,9 +498,10 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedRemoteFieldClassList.class); + responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest nextRequest = CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest.builder() @@ -538,12 +525,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawDeleteAccountClient.java b/src/main/java/com/merge/api/crm/AsyncRawDeleteAccountClient.java index 5bb70c635..a57a3c702 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawDeleteAccountClient.java @@ -63,11 +63,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO return; } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawEngagementTypesClient.java b/src/main/java/com/merge/api/crm/AsyncRawEngagementTypesClient.java index dff80dc76..bffef283c 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawEngagementTypesClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawEngagementTypesClient.java @@ -132,9 +132,10 @@ public CompletableFuture @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedEngagementTypeList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedEngagementTypeList.class); + responseBodyString, PaginatedEngagementTypeList.class); Optional startingAfter = parsedResponse.getNext(); EngagementTypesListRequest nextRequest = EngagementTypesListRequest.builder() .from(request) @@ -156,12 +157,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -233,18 +231,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), EngagementType.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, EngagementType.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -343,9 +339,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); EngagementTypesRemoteFieldClassesListRequest nextRequest = EngagementTypesRemoteFieldClassesListRequest.builder() @@ -368,12 +365,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawEngagementsClient.java b/src/main/java/com/merge/api/crm/AsyncRawEngagementsClient.java index da565cdae..9e54f64b7 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawEngagementsClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawEngagementsClient.java @@ -25,9 +25,7 @@ import com.merge.api.crm.types.RemoteFieldClass; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -152,9 +150,10 @@ public CompletableFuture>> l @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedEngagementList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedEngagementList.class); + PaginatedEngagementList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedEngagementList.class); Optional startingAfter = parsedResponse.getNext(); EngagementsListRequest nextRequest = EngagementsListRequest.builder() .from(request) @@ -175,12 +174,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -218,12 +214,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -243,18 +237,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), EngagementResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, EngagementResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -329,18 +321,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Engagement.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Engagement.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -380,12 +369,10 @@ public CompletableFuture> partialUpdate QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -405,18 +392,16 @@ public CompletableFuture> partialUpdate @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), EngagementResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, EngagementResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -463,18 +448,15 @@ public CompletableFuture> metaPatchRetrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -519,18 +501,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -629,9 +608,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); EngagementsRemoteFieldClassesListRequest nextRequest = EngagementsRemoteFieldClassesListRequest.builder() @@ -654,12 +634,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawFieldMappingClient.java b/src/main/java/com/merge/api/crm/AsyncRawFieldMappingClient.java index 616e00529..de327da12 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawFieldMappingClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawFieldMappingClient.java @@ -21,8 +21,6 @@ import com.merge.api.crm.types.RemoteFieldApiResponse; import com.merge.api.crm.types.RemoteFieldsRetrieveRequest; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -87,19 +85,17 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingApiInstanceResponse.class), + responseBodyString, FieldMappingApiInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -137,17 +133,10 @@ public CompletableFuture> fie request.getExcludeRemoteFieldMetadata().get(), false); } - Map properties = new HashMap<>(); - properties.put("target_field_name", request.getTargetFieldName()); - properties.put("target_field_description", request.getTargetFieldDescription()); - properties.put("remote_field_traversal_path", request.getRemoteFieldTraversalPath()); - properties.put("remote_method", request.getRemoteMethod()); - properties.put("remote_url_path", request.getRemoteUrlPath()); - properties.put("common_model_name", request.getCommonModelName()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -167,19 +156,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -227,19 +214,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -304,19 +289,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -380,19 +363,16 @@ public CompletableFuture> remoteFie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), RemoteFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteFieldApiResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -438,19 +418,17 @@ public CompletableFuture> t @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), ExternalTargetFieldApiResponse.class), + responseBodyString, ExternalTargetFieldApiResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawForceResyncClient.java b/src/main/java/com/merge/api/crm/AsyncRawForceResyncClient.java index 9067c8aa7..0078a6f52 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawForceResyncClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawForceResyncClient.java @@ -63,19 +63,17 @@ public CompletableFuture>> syncStatusResyn @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawGenerateKeyClient.java b/src/main/java/com/merge/api/crm/AsyncRawGenerateKeyClient.java index 5bde260a2..68700b245 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawGenerateKeyClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawIssuesClient.java b/src/main/java/com/merge/api/crm/AsyncRawIssuesClient.java index 6664ce786..c0e6ecb4f 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawIssuesClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawIssuesClient.java @@ -145,9 +145,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedIssueList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedIssueList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedIssueList.class); Optional startingAfter = parsedResponse.getNext(); IssuesListRequest nextRequest = IssuesListRequest.builder() .from(request) @@ -167,12 +168,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -218,17 +216,15 @@ public CompletableFuture> retrieve(String id, Reques @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Issue.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Issue.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawLeadsClient.java b/src/main/java/com/merge/api/crm/AsyncRawLeadsClient.java index 2a17e84bd..9e1b7a59a 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawLeadsClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawLeadsClient.java @@ -24,9 +24,7 @@ import com.merge.api.crm.types.RemoteFieldClass; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -168,9 +166,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedLeadList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedLeadList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedLeadList.class); Optional startingAfter = parsedResponse.getNext(); LeadsListRequest nextRequest = LeadsListRequest.builder() .from(request) @@ -190,12 +189,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -233,12 +229,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -258,18 +252,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), LeadResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, LeadResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -344,17 +335,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Lead.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Lead.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -399,18 +388,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -509,9 +495,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); LeadsRemoteFieldClassesListRequest nextRequest = LeadsRemoteFieldClassesListRequest.builder() .from(request) @@ -533,12 +520,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawLinkTokenClient.java b/src/main/java/com/merge/api/crm/AsyncRawLinkTokenClient.java index 800a82365..45d73540f 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawLinkTokenClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawLinkTokenClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), LinkToken.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, LinkToken.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawLinkedAccountsClient.java b/src/main/java/com/merge/api/crm/AsyncRawLinkedAccountsClient.java index 8ad5103f9..ea02041a8 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawLinkedAccountsClient.java @@ -138,9 +138,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); LinkedAccountsListRequest nextRequest = LinkedAccountsListRequest.builder() .from(request) @@ -162,12 +163,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawNotesClient.java b/src/main/java/com/merge/api/crm/AsyncRawNotesClient.java index d17fdcf02..52eceba0c 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawNotesClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawNotesClient.java @@ -24,9 +24,7 @@ import com.merge.api.crm.types.RemoteFieldClass; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -158,9 +156,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedNoteList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedNoteList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedNoteList.class); Optional startingAfter = parsedResponse.getNext(); NotesListRequest nextRequest = NotesListRequest.builder() .from(request) @@ -180,12 +179,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -223,12 +219,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -248,18 +242,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), NoteResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, NoteResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -334,17 +325,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Note.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Note.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -389,18 +378,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -499,9 +485,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); NotesRemoteFieldClassesListRequest nextRequest = NotesRemoteFieldClassesListRequest.builder() .from(request) @@ -523,12 +510,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawOpportunitiesClient.java b/src/main/java/com/merge/api/crm/AsyncRawOpportunitiesClient.java index 5b02267ac..d95ea7d25 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawOpportunitiesClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawOpportunitiesClient.java @@ -25,9 +25,7 @@ import com.merge.api.crm.types.RemoteFieldClass; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -175,9 +173,10 @@ public CompletableFuture>> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedOpportunityList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedOpportunityList.class); + PaginatedOpportunityList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedOpportunityList.class); Optional startingAfter = parsedResponse.getNext(); OpportunitiesListRequest nextRequest = OpportunitiesListRequest.builder() .from(request) @@ -198,12 +197,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -241,12 +237,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -266,18 +260,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), OpportunityResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, OpportunityResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -361,18 +353,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Opportunity.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Opportunity.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -412,12 +401,10 @@ public CompletableFuture> partialUpdat QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -437,18 +424,16 @@ public CompletableFuture> partialUpdat @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), OpportunityResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, OpportunityResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -495,18 +480,15 @@ public CompletableFuture> metaPatchRetrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -551,18 +533,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -661,9 +640,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); OpportunitiesRemoteFieldClassesListRequest nextRequest = OpportunitiesRemoteFieldClassesListRequest.builder() @@ -686,12 +666,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawPassthroughClient.java b/src/main/java/com/merge/api/crm/AsyncRawPassthroughClient.java index ffcfc0144..ad67cbe20 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawPassthroughClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawPassthroughClient.java @@ -72,18 +72,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawRegenerateKeyClient.java b/src/main/java/com/merge/api/crm/AsyncRawRegenerateKeyClient.java index f35780ff8..15c6d977e 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawRegenerateKeyClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawScopesClient.java b/src/main/java/com/merge/api/crm/AsyncRawScopesClient.java index e87abf042..98e442b03 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawScopesClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawScopesClient.java @@ -64,18 +64,16 @@ public CompletableFuture> defaultScope @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -121,18 +119,16 @@ public CompletableFuture> linkedAccoun @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -187,18 +183,16 @@ public CompletableFuture> linkedAccoun @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawStagesClient.java b/src/main/java/com/merge/api/crm/AsyncRawStagesClient.java index f1e513823..fc842aa89 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawStagesClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawStagesClient.java @@ -131,9 +131,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedStageList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedStageList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedStageList.class); Optional startingAfter = parsedResponse.getNext(); StagesListRequest nextRequest = StagesListRequest.builder() .from(request) @@ -153,12 +154,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -229,17 +227,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Stage.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Stage.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -338,9 +334,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); StagesRemoteFieldClassesListRequest nextRequest = StagesRemoteFieldClassesListRequest.builder() .from(request) @@ -362,12 +359,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawSyncStatusClient.java b/src/main/java/com/merge/api/crm/AsyncRawSyncStatusClient.java index 4340dcce5..113a310f9 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawSyncStatusClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawSyncStatusClient.java @@ -76,19 +76,16 @@ public CompletableFuture> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedSyncStatusList.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedSyncStatusList.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawTasksClient.java b/src/main/java/com/merge/api/crm/AsyncRawTasksClient.java index 10eb4a530..c9d1b249d 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawTasksClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawTasksClient.java @@ -25,9 +25,7 @@ import com.merge.api.crm.types.TasksRetrieveRequest; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -143,9 +141,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTaskList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTaskList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTaskList.class); Optional startingAfter = parsedResponse.getNext(); TasksListRequest nextRequest = TasksListRequest.builder() .from(request) @@ -165,12 +164,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -208,12 +204,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -233,18 +227,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TaskResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TaskResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -319,17 +310,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Task.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Task.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -369,12 +358,10 @@ public CompletableFuture> partialUpdate( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -394,18 +381,15 @@ public CompletableFuture> partialUpdate( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TaskResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TaskResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -452,18 +436,15 @@ public CompletableFuture> metaPatchRetrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -508,18 +489,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -618,9 +596,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); TasksRemoteFieldClassesListRequest nextRequest = TasksRemoteFieldClassesListRequest.builder() .from(request) @@ -642,12 +621,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawUsersClient.java b/src/main/java/com/merge/api/crm/AsyncRawUsersClient.java index 4f5137d1a..c4852aab6 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawUsersClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawUsersClient.java @@ -139,9 +139,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedUserList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedUserList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedUserList.class); Optional startingAfter = parsedResponse.getNext(); UsersListRequest nextRequest = UsersListRequest.builder() .from(request) @@ -161,12 +162,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -237,17 +235,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), User.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, User.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -307,11 +303,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO return; } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -410,9 +404,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); UsersRemoteFieldClassesListRequest nextRequest = UsersRemoteFieldClassesListRequest.builder() .from(request) @@ -434,12 +429,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/AsyncRawWebhookReceiversClient.java b/src/main/java/com/merge/api/crm/AsyncRawWebhookReceiversClient.java index 3b9b2a473..975b57f28 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawWebhookReceiversClient.java @@ -65,19 +65,17 @@ public CompletableFuture>> list(Reque @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -131,18 +129,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), WebhookReceiver.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, WebhookReceiver.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/crm/RawAccountDetailsClient.java b/src/main/java/com/merge/api/crm/RawAccountDetailsClient.java index 81d908b70..16203335a 100644 --- a/src/main/java/com/merge/api/crm/RawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/crm/RawAccountDetailsClient.java @@ -52,16 +52,13 @@ public MergeApiHttpResponse retrieve(RequestOptions requestOptio } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountDetails.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountDetails.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawAccountTokenClient.java b/src/main/java/com/merge/api/crm/RawAccountTokenClient.java index efd6d7f8f..0b8352bee 100644 --- a/src/main/java/com/merge/api/crm/RawAccountTokenClient.java +++ b/src/main/java/com/merge/api/crm/RawAccountTokenClient.java @@ -53,16 +53,13 @@ public MergeApiHttpResponse retrieve(String publicToken, RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountToken.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountToken.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawAccountsClient.java b/src/main/java/com/merge/api/crm/RawAccountsClient.java index 8518571ac..f87128835 100644 --- a/src/main/java/com/merge/api/crm/RawAccountsClient.java +++ b/src/main/java/com/merge/api/crm/RawAccountsClient.java @@ -25,9 +25,7 @@ import com.merge.api.crm.types.RemoteFieldClass; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -143,9 +141,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAccountList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedAccountList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAccountList.class); Optional startingAfter = parsedResponse.getNext(); AccountsListRequest nextRequest = AccountsListRequest.builder() .from(request) @@ -158,12 +157,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -192,12 +187,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -214,16 +207,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CrmAccountResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CrmAccountResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -286,16 +276,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Account.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Account.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -325,12 +312,10 @@ public MergeApiHttpResponse partialUpdate( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -347,16 +332,13 @@ public MergeApiHttpResponse partialUpdate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CrmAccountResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CrmAccountResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -390,16 +372,13 @@ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -432,16 +411,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -527,9 +503,10 @@ public MergeApiHttpResponse> remoteFieldCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); AccountsRemoteFieldClassesListRequest nextRequest = AccountsRemoteFieldClassesListRequest.builder() .from(request) @@ -543,12 +520,8 @@ public MergeApiHttpResponse> remoteFieldCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawAssociationTypesClient.java b/src/main/java/com/merge/api/crm/RawAssociationTypesClient.java index 4ad0b8875..6ff7637ba 100644 --- a/src/main/java/com/merge/api/crm/RawAssociationTypesClient.java +++ b/src/main/java/com/merge/api/crm/RawAssociationTypesClient.java @@ -21,9 +21,7 @@ import com.merge.api.crm.types.PaginatedAssociationTypeList; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -132,9 +130,10 @@ public MergeApiHttpResponse> customObjectCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAssociationTypeList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedAssociationTypeList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAssociationTypeList.class); Optional startingAfter = parsedResponse.getNext(); CustomObjectClassesAssociationTypesListRequest nextRequest = CustomObjectClassesAssociationTypesListRequest.builder() @@ -152,12 +151,8 @@ public MergeApiHttpResponse> customObjectCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -189,12 +184,10 @@ public MergeApiHttpResponse customObjectClassesAssoc QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -211,17 +204,14 @@ public MergeApiHttpResponse customObjectClassesAssoc } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CrmAssociationTypeResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CrmAssociationTypeResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -287,16 +277,13 @@ public MergeApiHttpResponse customObjectClassesAssociationTypes } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AssociationType.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AssociationType.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -319,7 +306,8 @@ public MergeApiHttpResponse customObjectClassesAssociationTypesMet .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) - .addPathSegments("association-types/meta/post") + .addPathSegments("association-types/meta") + .addPathSegments("post") .build(); Request okhttpRequest = new Request.Builder() .url(httpUrl) @@ -333,16 +321,13 @@ public MergeApiHttpResponse customObjectClassesAssociationTypesMet } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawAssociationsClient.java b/src/main/java/com/merge/api/crm/RawAssociationsClient.java index 5a481d89c..8f01962f6 100644 --- a/src/main/java/com/merge/api/crm/RawAssociationsClient.java +++ b/src/main/java/com/merge/api/crm/RawAssociationsClient.java @@ -140,9 +140,10 @@ public MergeApiHttpResponse> customObjectClasses } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAssociationList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedAssociationList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAssociationList.class); Optional startingAfter = parsedResponse.getNext(); CustomObjectClassesCustomObjectsAssociationsListRequest nextRequest = CustomObjectClassesCustomObjectsAssociationsListRequest.builder() @@ -160,12 +161,8 @@ public MergeApiHttpResponse> customObjectClasses .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -245,16 +242,13 @@ public MergeApiHttpResponse customObjectClassesCustomObjectsAssocia } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Association.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Association.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawAsyncPassthroughClient.java b/src/main/java/com/merge/api/crm/RawAsyncPassthroughClient.java index d3b7a0b72..e1800d78b 100644 --- a/src/main/java/com/merge/api/crm/RawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/crm/RawAsyncPassthroughClient.java @@ -66,17 +66,14 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AsyncPassthroughReciept.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughReciept.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -111,18 +108,14 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughRetrieveResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughRetrieveResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawAuditTrailClient.java b/src/main/java/com/merge/api/crm/RawAuditTrailClient.java index 326d3aebb..10a5067a3 100644 --- a/src/main/java/com/merge/api/crm/RawAuditTrailClient.java +++ b/src/main/java/com/merge/api/crm/RawAuditTrailClient.java @@ -90,9 +90,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAuditLogEventList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedAuditLogEventList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAuditLogEventList.class); Optional startingAfter = parsedResponse.getNext(); AuditTrailListRequest nextRequest = AuditTrailListRequest.builder() .from(request) @@ -106,12 +107,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawAvailableActionsClient.java b/src/main/java/com/merge/api/crm/RawAvailableActionsClient.java index ca7d3cee0..a7a39ec8c 100644 --- a/src/main/java/com/merge/api/crm/RawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/crm/RawAvailableActionsClient.java @@ -52,16 +52,13 @@ public MergeApiHttpResponse retrieve(RequestOptions requestOpt } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AvailableActions.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AvailableActions.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawContactsClient.java b/src/main/java/com/merge/api/crm/RawContactsClient.java index f8583b71f..4fb73dad1 100644 --- a/src/main/java/com/merge/api/crm/RawContactsClient.java +++ b/src/main/java/com/merge/api/crm/RawContactsClient.java @@ -27,9 +27,7 @@ import com.merge.api.crm.types.RemoteFieldClass; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -149,9 +147,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedContactList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedContactList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedContactList.class); Optional startingAfter = parsedResponse.getNext(); ContactsListRequest nextRequest = ContactsListRequest.builder() .from(request) @@ -164,12 +163,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -198,12 +193,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -220,16 +213,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CrmContactResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CrmContactResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -292,16 +282,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Contact.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Contact.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -331,12 +318,10 @@ public MergeApiHttpResponse partialUpdate( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -353,16 +338,13 @@ public MergeApiHttpResponse partialUpdate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CrmContactResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CrmContactResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -408,11 +390,8 @@ public MergeApiHttpResponse ignoreCreate( return new MergeApiHttpResponse<>(null, response); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -446,16 +425,13 @@ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -488,16 +464,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -583,9 +556,10 @@ public MergeApiHttpResponse> remoteFieldCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); ContactsRemoteFieldClassesListRequest nextRequest = ContactsRemoteFieldClassesListRequest.builder() .from(request) @@ -599,12 +573,8 @@ public MergeApiHttpResponse> remoteFieldCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawCustomObjectClassesClient.java b/src/main/java/com/merge/api/crm/RawCustomObjectClassesClient.java index db7d844f2..3fbc56a99 100644 --- a/src/main/java/com/merge/api/crm/RawCustomObjectClassesClient.java +++ b/src/main/java/com/merge/api/crm/RawCustomObjectClassesClient.java @@ -117,9 +117,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedCustomObjectClassList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedCustomObjectClassList.class); + PaginatedCustomObjectClassList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedCustomObjectClassList.class); Optional startingAfter = parsedResponse.getNext(); CustomObjectClassesListRequest nextRequest = CustomObjectClassesListRequest.builder() .from(request) @@ -133,12 +134,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -194,16 +191,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CustomObjectClass.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CustomObjectClass.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawCustomObjectsClient.java b/src/main/java/com/merge/api/crm/RawCustomObjectsClient.java index b43534cb2..6e3e3d466 100644 --- a/src/main/java/com/merge/api/crm/RawCustomObjectsClient.java +++ b/src/main/java/com/merge/api/crm/RawCustomObjectsClient.java @@ -24,9 +24,7 @@ import com.merge.api.crm.types.RemoteFieldClass; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -138,9 +136,10 @@ public MergeApiHttpResponse> customObjectClasse } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedCustomObjectList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedCustomObjectList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedCustomObjectList.class); Optional startingAfter = parsedResponse.getNext(); CustomObjectClassesCustomObjectsListRequest nextRequest = CustomObjectClassesCustomObjectsListRequest.builder() @@ -158,12 +157,8 @@ public MergeApiHttpResponse> customObjectClasse .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -195,12 +190,10 @@ public MergeApiHttpResponse customObjectClassesCustomOb QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -217,17 +210,14 @@ public MergeApiHttpResponse customObjectClassesCustomOb } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CrmCustomObjectResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CrmCustomObjectResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -296,16 +286,13 @@ public MergeApiHttpResponse customObjectClassesCustomObjectsRetrie } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CustomObject.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CustomObject.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -328,7 +315,8 @@ public MergeApiHttpResponse customObjectClassesCustomObjectsMetaPo .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) - .addPathSegments("custom-objects/meta/post") + .addPathSegments("custom-objects/meta") + .addPathSegments("post") .build(); Request okhttpRequest = new Request.Builder() .url(httpUrl) @@ -342,16 +330,13 @@ public MergeApiHttpResponse customObjectClassesCustomObjectsMetaPo } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -442,9 +427,10 @@ public MergeApiHttpResponse customObjectClassesCustomObjectsMetaPo } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest nextRequest = CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest.builder() @@ -462,12 +448,8 @@ public MergeApiHttpResponse customObjectClassesCustomObjectsMetaPo .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawDeleteAccountClient.java b/src/main/java/com/merge/api/crm/RawDeleteAccountClient.java index 9ae521a37..d07da4294 100644 --- a/src/main/java/com/merge/api/crm/RawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/crm/RawDeleteAccountClient.java @@ -55,11 +55,8 @@ public MergeApiHttpResponse delete(RequestOptions requestOptions) { return new MergeApiHttpResponse<>(null, response); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawEngagementTypesClient.java b/src/main/java/com/merge/api/crm/RawEngagementTypesClient.java index e127644cc..5283b266b 100644 --- a/src/main/java/com/merge/api/crm/RawEngagementTypesClient.java +++ b/src/main/java/com/merge/api/crm/RawEngagementTypesClient.java @@ -123,9 +123,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedEngagementTypeList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedEngagementTypeList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedEngagementTypeList.class); Optional startingAfter = parsedResponse.getNext(); EngagementTypesListRequest nextRequest = EngagementTypesListRequest.builder() .from(request) @@ -139,12 +140,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -203,16 +200,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), EngagementType.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, EngagementType.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -298,9 +292,10 @@ public MergeApiHttpResponse> remoteFieldCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); EngagementTypesRemoteFieldClassesListRequest nextRequest = EngagementTypesRemoteFieldClassesListRequest.builder() @@ -315,12 +310,8 @@ public MergeApiHttpResponse> remoteFieldCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawEngagementsClient.java b/src/main/java/com/merge/api/crm/RawEngagementsClient.java index 40b6e4a90..4d3b34528 100644 --- a/src/main/java/com/merge/api/crm/RawEngagementsClient.java +++ b/src/main/java/com/merge/api/crm/RawEngagementsClient.java @@ -25,9 +25,7 @@ import com.merge.api.crm.types.RemoteFieldClass; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -143,9 +141,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedEngagementList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedEngagementList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedEngagementList.class); Optional startingAfter = parsedResponse.getNext(); EngagementsListRequest nextRequest = EngagementsListRequest.builder() .from(request) @@ -159,12 +158,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -193,12 +188,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -215,16 +208,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), EngagementResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, EngagementResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -287,16 +277,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Engagement.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Engagement.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -326,12 +313,10 @@ public MergeApiHttpResponse partialUpdate( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -348,16 +333,13 @@ public MergeApiHttpResponse partialUpdate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), EngagementResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, EngagementResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -391,16 +373,13 @@ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -433,16 +412,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -528,9 +504,10 @@ public MergeApiHttpResponse> remoteFieldCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); EngagementsRemoteFieldClassesListRequest nextRequest = EngagementsRemoteFieldClassesListRequest.builder() @@ -545,12 +522,8 @@ public MergeApiHttpResponse> remoteFieldCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawFieldMappingClient.java b/src/main/java/com/merge/api/crm/RawFieldMappingClient.java index ee9a91ba4..572b553c0 100644 --- a/src/main/java/com/merge/api/crm/RawFieldMappingClient.java +++ b/src/main/java/com/merge/api/crm/RawFieldMappingClient.java @@ -21,8 +21,6 @@ import com.merge.api.crm.types.RemoteFieldApiResponse; import com.merge.api.crm.types.RemoteFieldsRetrieveRequest; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -80,18 +78,14 @@ public MergeApiHttpResponse fieldMappingsRetrie } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingApiInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingApiInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -119,17 +113,10 @@ public MergeApiHttpResponse fieldMappingsCreate( request.getExcludeRemoteFieldMetadata().get(), false); } - Map properties = new HashMap<>(); - properties.put("target_field_name", request.getTargetFieldName()); - properties.put("target_field_description", request.getTargetFieldDescription()); - properties.put("remote_field_traversal_path", request.getRemoteFieldTraversalPath()); - properties.put("remote_method", request.getRemoteMethod()); - properties.put("remote_url_path", request.getRemoteUrlPath()); - properties.put("common_model_name", request.getCommonModelName()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -146,17 +133,14 @@ public MergeApiHttpResponse fieldMappingsCreate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -191,17 +175,14 @@ public MergeApiHttpResponse fieldMappingsDestroy( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -253,17 +234,14 @@ public MergeApiHttpResponse fieldMappingsPartialUp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -314,17 +292,14 @@ public MergeApiHttpResponse remoteFieldsRetrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteFieldApiResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -357,18 +332,14 @@ public MergeApiHttpResponse targetFieldsRetrieve } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), ExternalTargetFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ExternalTargetFieldApiResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawForceResyncClient.java b/src/main/java/com/merge/api/crm/RawForceResyncClient.java index 3d17a10af..2d5af8487 100644 --- a/src/main/java/com/merge/api/crm/RawForceResyncClient.java +++ b/src/main/java/com/merge/api/crm/RawForceResyncClient.java @@ -55,18 +55,15 @@ public MergeApiHttpResponse> syncStatusResyncCreate(RequestOpti } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawGenerateKeyClient.java b/src/main/java/com/merge/api/crm/RawGenerateKeyClient.java index 1855807ce..970631321 100644 --- a/src/main/java/com/merge/api/crm/RawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/crm/RawGenerateKeyClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request, } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawIssuesClient.java b/src/main/java/com/merge/api/crm/RawIssuesClient.java index 822473fd5..6638da7b3 100644 --- a/src/main/java/com/merge/api/crm/RawIssuesClient.java +++ b/src/main/java/com/merge/api/crm/RawIssuesClient.java @@ -137,9 +137,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedIssueList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedIssueList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedIssueList.class); Optional startingAfter = parsedResponse.getNext(); IssuesListRequest nextRequest = IssuesListRequest.builder() .from(request) @@ -152,12 +153,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -191,16 +188,13 @@ public MergeApiHttpResponse retrieve(String id, RequestOptions requestOpt } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Issue.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Issue.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawLeadsClient.java b/src/main/java/com/merge/api/crm/RawLeadsClient.java index 37a53a460..2a1d05dc5 100644 --- a/src/main/java/com/merge/api/crm/RawLeadsClient.java +++ b/src/main/java/com/merge/api/crm/RawLeadsClient.java @@ -24,9 +24,7 @@ import com.merge.api.crm.types.RemoteFieldClass; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -160,9 +158,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedLeadList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedLeadList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedLeadList.class); Optional startingAfter = parsedResponse.getNext(); LeadsListRequest nextRequest = LeadsListRequest.builder() .from(request) @@ -175,12 +174,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -208,12 +203,10 @@ public MergeApiHttpResponse create(LeadEndpointRequest request, Re QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -230,16 +223,13 @@ public MergeApiHttpResponse create(LeadEndpointRequest request, Re } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), LeadResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, LeadResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -301,16 +291,13 @@ public MergeApiHttpResponse retrieve(String id, LeadsRetrieveRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Lead.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Lead.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -343,16 +330,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -438,9 +422,10 @@ public MergeApiHttpResponse> remoteFieldCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); LeadsRemoteFieldClassesListRequest nextRequest = LeadsRemoteFieldClassesListRequest.builder() .from(request) @@ -454,12 +439,8 @@ public MergeApiHttpResponse> remoteFieldCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawLinkTokenClient.java b/src/main/java/com/merge/api/crm/RawLinkTokenClient.java index 4bf0eeedd..5b96215c0 100644 --- a/src/main/java/com/merge/api/crm/RawLinkTokenClient.java +++ b/src/main/java/com/merge/api/crm/RawLinkTokenClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(EndUserDetailsRequest request, Req } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), LinkToken.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, LinkToken.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawLinkedAccountsClient.java b/src/main/java/com/merge/api/crm/RawLinkedAccountsClient.java index 8896a07d7..6dded56bc 100644 --- a/src/main/java/com/merge/api/crm/RawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/crm/RawLinkedAccountsClient.java @@ -128,9 +128,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAccountDetailsAndActionsList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedAccountDetailsAndActionsList.class); + responseBodyString, PaginatedAccountDetailsAndActionsList.class); Optional startingAfter = parsedResponse.getNext(); LinkedAccountsListRequest nextRequest = LinkedAccountsListRequest.builder() .from(request) @@ -145,12 +146,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawNotesClient.java b/src/main/java/com/merge/api/crm/RawNotesClient.java index bc3f772e8..d3521e3a7 100644 --- a/src/main/java/com/merge/api/crm/RawNotesClient.java +++ b/src/main/java/com/merge/api/crm/RawNotesClient.java @@ -24,9 +24,7 @@ import com.merge.api.crm.types.RemoteFieldClass; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -150,9 +148,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedNoteList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedNoteList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedNoteList.class); Optional startingAfter = parsedResponse.getNext(); NotesListRequest nextRequest = NotesListRequest.builder() .from(request) @@ -165,12 +164,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -198,12 +193,10 @@ public MergeApiHttpResponse create(NoteEndpointRequest request, Re QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -220,16 +213,13 @@ public MergeApiHttpResponse create(NoteEndpointRequest request, Re } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), NoteResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, NoteResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -291,16 +281,13 @@ public MergeApiHttpResponse retrieve(String id, NotesRetrieveRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Note.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Note.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -333,16 +320,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -428,9 +412,10 @@ public MergeApiHttpResponse> remoteFieldCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); NotesRemoteFieldClassesListRequest nextRequest = NotesRemoteFieldClassesListRequest.builder() .from(request) @@ -444,12 +429,8 @@ public MergeApiHttpResponse> remoteFieldCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawOpportunitiesClient.java b/src/main/java/com/merge/api/crm/RawOpportunitiesClient.java index fabefdb7b..66e877eab 100644 --- a/src/main/java/com/merge/api/crm/RawOpportunitiesClient.java +++ b/src/main/java/com/merge/api/crm/RawOpportunitiesClient.java @@ -25,9 +25,7 @@ import com.merge.api.crm.types.RemoteFieldClass; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -166,9 +164,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedOpportunityList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedOpportunityList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedOpportunityList.class); Optional startingAfter = parsedResponse.getNext(); OpportunitiesListRequest nextRequest = OpportunitiesListRequest.builder() .from(request) @@ -182,12 +181,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -216,12 +211,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -238,17 +231,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), OpportunityResponse.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, OpportunityResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -319,16 +308,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Opportunity.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Opportunity.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -359,12 +345,10 @@ public MergeApiHttpResponse partialUpdate( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -381,17 +365,13 @@ public MergeApiHttpResponse partialUpdate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), OpportunityResponse.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, OpportunityResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -425,16 +405,13 @@ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -467,16 +444,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -562,9 +536,10 @@ public MergeApiHttpResponse> remoteFieldCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); OpportunitiesRemoteFieldClassesListRequest nextRequest = OpportunitiesRemoteFieldClassesListRequest.builder() @@ -579,12 +554,8 @@ public MergeApiHttpResponse> remoteFieldCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawPassthroughClient.java b/src/main/java/com/merge/api/crm/RawPassthroughClient.java index 7400a4b84..8f7517836 100644 --- a/src/main/java/com/merge/api/crm/RawPassthroughClient.java +++ b/src/main/java/com/merge/api/crm/RawPassthroughClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(DataPassthroughRequest reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawRegenerateKeyClient.java b/src/main/java/com/merge/api/crm/RawRegenerateKeyClient.java index 415e291c4..170acc928 100644 --- a/src/main/java/com/merge/api/crm/RawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/crm/RawRegenerateKeyClient.java @@ -65,16 +65,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawScopesClient.java b/src/main/java/com/merge/api/crm/RawScopesClient.java index 6fb028620..a927e0fa0 100644 --- a/src/main/java/com/merge/api/crm/RawScopesClient.java +++ b/src/main/java/com/merge/api/crm/RawScopesClient.java @@ -56,17 +56,13 @@ public MergeApiHttpResponse defaultScopesRetrieve(RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -99,17 +95,13 @@ public MergeApiHttpResponse linkedAccountScopesRetrieve(Req } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -152,17 +144,13 @@ public MergeApiHttpResponse linkedAccountScopesCreate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawStagesClient.java b/src/main/java/com/merge/api/crm/RawStagesClient.java index 559619059..484788800 100644 --- a/src/main/java/com/merge/api/crm/RawStagesClient.java +++ b/src/main/java/com/merge/api/crm/RawStagesClient.java @@ -123,9 +123,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedStageList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedStageList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedStageList.class); Optional startingAfter = parsedResponse.getNext(); StagesListRequest nextRequest = StagesListRequest.builder() .from(request) @@ -138,12 +139,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -202,16 +199,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Stage.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Stage.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -297,9 +291,10 @@ public MergeApiHttpResponse> remoteFieldCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); StagesRemoteFieldClassesListRequest nextRequest = StagesRemoteFieldClassesListRequest.builder() .from(request) @@ -313,12 +308,8 @@ public MergeApiHttpResponse> remoteFieldCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawSyncStatusClient.java b/src/main/java/com/merge/api/crm/RawSyncStatusClient.java index 47e8ab767..246b359e1 100644 --- a/src/main/java/com/merge/api/crm/RawSyncStatusClient.java +++ b/src/main/java/com/merge/api/crm/RawSyncStatusClient.java @@ -69,17 +69,14 @@ public MergeApiHttpResponse list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedSyncStatusList.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedSyncStatusList.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawTasksClient.java b/src/main/java/com/merge/api/crm/RawTasksClient.java index 26e683c50..ce64ba2d3 100644 --- a/src/main/java/com/merge/api/crm/RawTasksClient.java +++ b/src/main/java/com/merge/api/crm/RawTasksClient.java @@ -25,9 +25,7 @@ import com.merge.api.crm.types.TasksRetrieveRequest; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -135,9 +133,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTaskList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTaskList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTaskList.class); Optional startingAfter = parsedResponse.getNext(); TasksListRequest nextRequest = TasksListRequest.builder() .from(request) @@ -150,12 +149,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -183,12 +178,10 @@ public MergeApiHttpResponse create(TaskEndpointRequest request, Re QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -205,16 +198,13 @@ public MergeApiHttpResponse create(TaskEndpointRequest request, Re } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TaskResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TaskResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -276,16 +266,13 @@ public MergeApiHttpResponse retrieve(String id, TasksRetrieveRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Task.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Task.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -315,12 +302,10 @@ public MergeApiHttpResponse partialUpdate( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -337,16 +322,13 @@ public MergeApiHttpResponse partialUpdate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TaskResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TaskResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -380,16 +362,13 @@ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -422,16 +401,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -517,9 +493,10 @@ public MergeApiHttpResponse> remoteFieldCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); TasksRemoteFieldClassesListRequest nextRequest = TasksRemoteFieldClassesListRequest.builder() .from(request) @@ -533,12 +510,8 @@ public MergeApiHttpResponse> remoteFieldCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawUsersClient.java b/src/main/java/com/merge/api/crm/RawUsersClient.java index 0c0162460..24764f714 100644 --- a/src/main/java/com/merge/api/crm/RawUsersClient.java +++ b/src/main/java/com/merge/api/crm/RawUsersClient.java @@ -131,9 +131,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedUserList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedUserList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedUserList.class); Optional startingAfter = parsedResponse.getNext(); UsersListRequest nextRequest = UsersListRequest.builder() .from(request) @@ -146,12 +147,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -209,16 +206,13 @@ public MergeApiHttpResponse retrieve(String id, UsersRetrieveRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), User.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, User.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -264,11 +258,8 @@ public MergeApiHttpResponse ignoreCreate( return new MergeApiHttpResponse<>(null, response); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -354,9 +345,10 @@ public MergeApiHttpResponse> remoteFieldCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); UsersRemoteFieldClassesListRequest nextRequest = UsersRemoteFieldClassesListRequest.builder() .from(request) @@ -370,12 +362,8 @@ public MergeApiHttpResponse> remoteFieldCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/RawWebhookReceiversClient.java b/src/main/java/com/merge/api/crm/RawWebhookReceiversClient.java index a61971575..2862c1127 100644 --- a/src/main/java/com/merge/api/crm/RawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/crm/RawWebhookReceiversClient.java @@ -58,18 +58,15 @@ public MergeApiHttpResponse> list(RequestOptions requestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -110,16 +107,13 @@ public MergeApiHttpResponse create(WebhookReceiverRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), WebhookReceiver.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, WebhookReceiver.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/crm/types/RemoteData.java b/src/main/java/com/merge/api/crm/types/RemoteData.java index 327e796bd..c99b28b03 100644 --- a/src/main/java/com/merge/api/crm/types/RemoteData.java +++ b/src/main/java/com/merge/api/crm/types/RemoteData.java @@ -42,6 +42,9 @@ public String getPath() { return path; } + /** + * @return The data returned from the third-party for this object in its original, unnormalized format. + */ @JsonProperty("data") public Optional getData() { return data; @@ -88,6 +91,9 @@ public interface PathStage { public interface _FinalStage { RemoteData build(); + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ */ _FinalStage data(Optional data); _FinalStage data(JsonNode data); @@ -123,12 +129,19 @@ public _FinalStage path(@NotNull String path) { return this; } + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage data(JsonNode data) { this.data = Optional.ofNullable(data); return this; } + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ */ @java.lang.Override @JsonSetter(value = "data", nulls = Nulls.SKIP) public _FinalStage data(Optional data) { diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawAccountDetailsClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawAccountDetailsClient.java index 3b63d99a9..aafcad5fa 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawAccountDetailsClient.java @@ -59,18 +59,16 @@ public CompletableFuture> retrieve(RequestO @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountDetails.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountDetails.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawAccountTokenClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawAccountTokenClient.java index 2c584f1eb..722f9cc58 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawAccountTokenClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawAccountTokenClient.java @@ -61,18 +61,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountToken.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountToken.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawAsyncPassthroughClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawAsyncPassthroughClient.java index a8678980d..fa6343601 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawAsyncPassthroughClient.java @@ -73,19 +73,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughReciept.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughReciept.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -133,19 +130,17 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughRetrieveResponse.class), + responseBodyString, AsyncPassthroughRetrieveResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawAuditTrailClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawAuditTrailClient.java index 7deda98e4..64980cb95 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawAuditTrailClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawAuditTrailClient.java @@ -99,9 +99,10 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAuditLogEventList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedAuditLogEventList.class); + responseBodyString, PaginatedAuditLogEventList.class); Optional startingAfter = parsedResponse.getNext(); AuditTrailListRequest nextRequest = AuditTrailListRequest.builder() .from(request) @@ -122,12 +123,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawAvailableActionsClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawAvailableActionsClient.java index 9a5e18bce..5bff0666e 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawAvailableActionsClient.java @@ -59,18 +59,16 @@ public CompletableFuture> retrieve(Reques @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AvailableActions.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AvailableActions.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawDeleteAccountClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawDeleteAccountClient.java index bc1c5c40d..20b9fa5de 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawDeleteAccountClient.java @@ -63,11 +63,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO return; } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawDrivesClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawDrivesClient.java index 165bf7e3c..85d616452 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawDrivesClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawDrivesClient.java @@ -125,9 +125,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedDriveList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedDriveList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedDriveList.class); Optional startingAfter = parsedResponse.getNext(); DrivesListRequest nextRequest = DrivesListRequest.builder() .from(request) @@ -147,12 +148,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -216,17 +214,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Drive.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Drive.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawFieldMappingClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawFieldMappingClient.java index b40188876..5cbbc2375 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawFieldMappingClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawFieldMappingClient.java @@ -21,8 +21,6 @@ import com.merge.api.filestorage.types.RemoteFieldApiResponse; import com.merge.api.filestorage.types.RemoteFieldsRetrieveRequest; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -87,19 +85,17 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingApiInstanceResponse.class), + responseBodyString, FieldMappingApiInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -137,17 +133,10 @@ public CompletableFuture> fie request.getExcludeRemoteFieldMetadata().get(), false); } - Map properties = new HashMap<>(); - properties.put("target_field_name", request.getTargetFieldName()); - properties.put("target_field_description", request.getTargetFieldDescription()); - properties.put("remote_field_traversal_path", request.getRemoteFieldTraversalPath()); - properties.put("remote_method", request.getRemoteMethod()); - properties.put("remote_url_path", request.getRemoteUrlPath()); - properties.put("common_model_name", request.getCommonModelName()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -167,19 +156,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -227,19 +214,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -304,19 +289,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -380,19 +363,16 @@ public CompletableFuture> remoteFie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), RemoteFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteFieldApiResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -438,19 +418,17 @@ public CompletableFuture> t @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), ExternalTargetFieldApiResponse.class), + responseBodyString, ExternalTargetFieldApiResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawFilesClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawFilesClient.java index 7f853f20d..580e55308 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawFilesClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawFilesClient.java @@ -28,9 +28,7 @@ import java.io.IOException; import java.io.InputStream; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -159,9 +157,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedFileList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedFileList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedFileList.class); Optional startingAfter = parsedResponse.getNext(); FilesListRequest nextRequest = FilesListRequest.builder() .from(request) @@ -181,12 +180,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -225,12 +221,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -250,19 +244,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FileStorageFileResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FileStorageFileResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -330,17 +321,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), File.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, File.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -408,11 +397,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO return; } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -452,7 +439,8 @@ public CompletableFuture> downloadRequ .newBuilder() .addPathSegments("filestorage/v1/files") .addPathSegment(id) - .addPathSegments("download/request-meta"); + .addPathSegments("download") + .addPathSegments("request-meta"); if (request.getMimeType().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "mime_type", request.getMimeType().get(), false); @@ -472,18 +460,16 @@ public CompletableFuture> downloadRequ @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), DownloadRequestMeta.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DownloadRequestMeta.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -577,9 +563,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); FilesDownloadRequestMetaListRequest nextRequest = FilesDownloadRequestMetaListRequest.builder() .from(request) @@ -601,12 +588,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -651,18 +635,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawFoldersClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawFoldersClient.java index 5baddd10b..f2cc2c380 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawFoldersClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawFoldersClient.java @@ -21,9 +21,7 @@ import com.merge.api.filestorage.types.PaginatedFolderList; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -144,9 +142,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedFolderList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedFolderList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedFolderList.class); Optional startingAfter = parsedResponse.getNext(); FoldersListRequest nextRequest = FoldersListRequest.builder() .from(request) @@ -167,12 +166,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -211,12 +207,10 @@ public CompletableFuture> create QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -236,19 +230,17 @@ public CompletableFuture> create @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FileStorageFolderResponse.class), + responseBodyString, FileStorageFolderResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -316,17 +308,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Folder.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Folder.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -371,18 +361,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawForceResyncClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawForceResyncClient.java index c60e573c1..d42735421 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawForceResyncClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawForceResyncClient.java @@ -63,19 +63,17 @@ public CompletableFuture>> syncStatusResyn @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawGenerateKeyClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawGenerateKeyClient.java index 41672596f..e29de1a3d 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawGenerateKeyClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawGroupsClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawGroupsClient.java index 6ca9a1089..0a20bbae1 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawGroupsClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawGroupsClient.java @@ -125,9 +125,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedGroupList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedGroupList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedGroupList.class); Optional startingAfter = parsedResponse.getNext(); GroupsListRequest nextRequest = GroupsListRequest.builder() .from(request) @@ -147,12 +148,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -220,17 +218,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Group.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Group.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawIssuesClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawIssuesClient.java index 3d298ab44..3c22ef2d8 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawIssuesClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawIssuesClient.java @@ -145,9 +145,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedIssueList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedIssueList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedIssueList.class); Optional startingAfter = parsedResponse.getNext(); IssuesListRequest nextRequest = IssuesListRequest.builder() .from(request) @@ -167,12 +168,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -218,17 +216,15 @@ public CompletableFuture> retrieve(String id, Reques @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Issue.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Issue.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawLinkTokenClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawLinkTokenClient.java index f8c724952..de430bee3 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawLinkTokenClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawLinkTokenClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), LinkToken.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, LinkToken.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawLinkedAccountsClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawLinkedAccountsClient.java index 7b5468283..c360e961f 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawLinkedAccountsClient.java @@ -138,9 +138,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); LinkedAccountsListRequest nextRequest = LinkedAccountsListRequest.builder() .from(request) @@ -162,12 +163,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawPassthroughClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawPassthroughClient.java index f7f1e8d76..6fce31269 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawPassthroughClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawPassthroughClient.java @@ -72,18 +72,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawRegenerateKeyClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawRegenerateKeyClient.java index 8966768a8..153358e02 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawRegenerateKeyClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawScopesClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawScopesClient.java index 14a7060a9..f6e691a66 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawScopesClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawScopesClient.java @@ -64,18 +64,16 @@ public CompletableFuture> defaultScope @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -121,18 +119,16 @@ public CompletableFuture> linkedAccoun @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -187,18 +183,16 @@ public CompletableFuture> linkedAccoun @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawSyncStatusClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawSyncStatusClient.java index df18cb20b..4b5ec48c4 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawSyncStatusClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawSyncStatusClient.java @@ -82,9 +82,10 @@ public CompletableFuture>> l @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedSyncStatusList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedSyncStatusList.class); + PaginatedSyncStatusList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedSyncStatusList.class); Optional startingAfter = parsedResponse.getNext(); SyncStatusListRequest nextRequest = SyncStatusListRequest.builder() .from(request) @@ -105,12 +106,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawUsersClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawUsersClient.java index e48bd6af5..4c31e4912 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawUsersClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawUsersClient.java @@ -125,9 +125,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedUserList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedUserList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedUserList.class); Optional startingAfter = parsedResponse.getNext(); UsersListRequest nextRequest = UsersListRequest.builder() .from(request) @@ -147,12 +148,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -216,17 +214,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), User.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, User.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawWebhookReceiversClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawWebhookReceiversClient.java index c938d1654..bea69f94f 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawWebhookReceiversClient.java @@ -65,19 +65,17 @@ public CompletableFuture>> list(Reque @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -131,18 +129,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), WebhookReceiver.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, WebhookReceiver.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/filestorage/RawAccountDetailsClient.java b/src/main/java/com/merge/api/filestorage/RawAccountDetailsClient.java index 56b477b37..dd0385a1b 100644 --- a/src/main/java/com/merge/api/filestorage/RawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/filestorage/RawAccountDetailsClient.java @@ -52,16 +52,13 @@ public MergeApiHttpResponse retrieve(RequestOptions requestOptio } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountDetails.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountDetails.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawAccountTokenClient.java b/src/main/java/com/merge/api/filestorage/RawAccountTokenClient.java index e13c72499..36e349782 100644 --- a/src/main/java/com/merge/api/filestorage/RawAccountTokenClient.java +++ b/src/main/java/com/merge/api/filestorage/RawAccountTokenClient.java @@ -53,16 +53,13 @@ public MergeApiHttpResponse retrieve(String publicToken, RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountToken.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountToken.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawAsyncPassthroughClient.java b/src/main/java/com/merge/api/filestorage/RawAsyncPassthroughClient.java index 9a3d75e3f..39d34c2d0 100644 --- a/src/main/java/com/merge/api/filestorage/RawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/filestorage/RawAsyncPassthroughClient.java @@ -66,17 +66,14 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AsyncPassthroughReciept.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughReciept.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -111,18 +108,14 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughRetrieveResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughRetrieveResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawAuditTrailClient.java b/src/main/java/com/merge/api/filestorage/RawAuditTrailClient.java index e0fccd1b1..e74a30bed 100644 --- a/src/main/java/com/merge/api/filestorage/RawAuditTrailClient.java +++ b/src/main/java/com/merge/api/filestorage/RawAuditTrailClient.java @@ -90,9 +90,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAuditLogEventList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedAuditLogEventList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAuditLogEventList.class); Optional startingAfter = parsedResponse.getNext(); AuditTrailListRequest nextRequest = AuditTrailListRequest.builder() .from(request) @@ -106,12 +107,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawAvailableActionsClient.java b/src/main/java/com/merge/api/filestorage/RawAvailableActionsClient.java index 98768b638..8311f4c99 100644 --- a/src/main/java/com/merge/api/filestorage/RawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/filestorage/RawAvailableActionsClient.java @@ -52,16 +52,13 @@ public MergeApiHttpResponse retrieve(RequestOptions requestOpt } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AvailableActions.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AvailableActions.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawDeleteAccountClient.java b/src/main/java/com/merge/api/filestorage/RawDeleteAccountClient.java index 81a474def..fa1564fcc 100644 --- a/src/main/java/com/merge/api/filestorage/RawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/filestorage/RawDeleteAccountClient.java @@ -55,11 +55,8 @@ public MergeApiHttpResponse delete(RequestOptions requestOptions) { return new MergeApiHttpResponse<>(null, response); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawDrivesClient.java b/src/main/java/com/merge/api/filestorage/RawDrivesClient.java index c0859de30..f0f61bdc3 100644 --- a/src/main/java/com/merge/api/filestorage/RawDrivesClient.java +++ b/src/main/java/com/merge/api/filestorage/RawDrivesClient.java @@ -117,9 +117,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedDriveList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedDriveList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedDriveList.class); Optional startingAfter = parsedResponse.getNext(); DrivesListRequest nextRequest = DrivesListRequest.builder() .from(request) @@ -132,12 +133,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -189,16 +186,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Drive.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Drive.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawFieldMappingClient.java b/src/main/java/com/merge/api/filestorage/RawFieldMappingClient.java index fb475fffc..a4b849b3c 100644 --- a/src/main/java/com/merge/api/filestorage/RawFieldMappingClient.java +++ b/src/main/java/com/merge/api/filestorage/RawFieldMappingClient.java @@ -21,8 +21,6 @@ import com.merge.api.filestorage.types.RemoteFieldApiResponse; import com.merge.api.filestorage.types.RemoteFieldsRetrieveRequest; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -80,18 +78,14 @@ public MergeApiHttpResponse fieldMappingsRetrie } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingApiInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingApiInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -119,17 +113,10 @@ public MergeApiHttpResponse fieldMappingsCreate( request.getExcludeRemoteFieldMetadata().get(), false); } - Map properties = new HashMap<>(); - properties.put("target_field_name", request.getTargetFieldName()); - properties.put("target_field_description", request.getTargetFieldDescription()); - properties.put("remote_field_traversal_path", request.getRemoteFieldTraversalPath()); - properties.put("remote_method", request.getRemoteMethod()); - properties.put("remote_url_path", request.getRemoteUrlPath()); - properties.put("common_model_name", request.getCommonModelName()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -146,17 +133,14 @@ public MergeApiHttpResponse fieldMappingsCreate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -191,17 +175,14 @@ public MergeApiHttpResponse fieldMappingsDestroy( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -253,17 +234,14 @@ public MergeApiHttpResponse fieldMappingsPartialUp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -314,17 +292,14 @@ public MergeApiHttpResponse remoteFieldsRetrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteFieldApiResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -357,18 +332,14 @@ public MergeApiHttpResponse targetFieldsRetrieve } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), ExternalTargetFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ExternalTargetFieldApiResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawFilesClient.java b/src/main/java/com/merge/api/filestorage/RawFilesClient.java index 4fb34a6e5..4384d120d 100644 --- a/src/main/java/com/merge/api/filestorage/RawFilesClient.java +++ b/src/main/java/com/merge/api/filestorage/RawFilesClient.java @@ -28,9 +28,7 @@ import java.io.IOException; import java.io.InputStream; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -151,9 +149,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedFileList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedFileList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedFileList.class); Optional startingAfter = parsedResponse.getNext(); FilesListRequest nextRequest = FilesListRequest.builder() .from(request) @@ -166,12 +165,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -200,12 +195,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -222,17 +215,14 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FileStorageFileResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FileStorageFileResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -287,16 +277,13 @@ public MergeApiHttpResponse retrieve(String id, FilesRetrieveRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), File.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, File.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -350,11 +337,8 @@ public MergeApiHttpResponse downloadRetrieve( return new MergeApiHttpResponse<>(new ResponseBodyInputStream(response), response); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -385,7 +369,8 @@ public MergeApiHttpResponse downloadRequestMetaRetrieve( .newBuilder() .addPathSegments("filestorage/v1/files") .addPathSegment(id) - .addPathSegments("download/request-meta"); + .addPathSegments("download") + .addPathSegments("request-meta"); if (request.getMimeType().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "mime_type", request.getMimeType().get(), false); @@ -402,17 +387,13 @@ public MergeApiHttpResponse downloadRequestMetaRetrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), DownloadRequestMeta.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DownloadRequestMeta.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -493,9 +474,10 @@ public MergeApiHttpResponse> downloadReq } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedDownloadRequestMetaList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedDownloadRequestMetaList.class); + PaginatedDownloadRequestMetaList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedDownloadRequestMetaList.class); Optional startingAfter = parsedResponse.getNext(); FilesDownloadRequestMetaListRequest nextRequest = FilesDownloadRequestMetaListRequest.builder() .from(request) @@ -509,12 +491,8 @@ public MergeApiHttpResponse> downloadReq .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -547,16 +525,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawFoldersClient.java b/src/main/java/com/merge/api/filestorage/RawFoldersClient.java index 3d09fd355..7dcaddd68 100644 --- a/src/main/java/com/merge/api/filestorage/RawFoldersClient.java +++ b/src/main/java/com/merge/api/filestorage/RawFoldersClient.java @@ -21,9 +21,7 @@ import com.merge.api.filestorage.types.PaginatedFolderList; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -136,9 +134,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedFolderList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedFolderList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedFolderList.class); Optional startingAfter = parsedResponse.getNext(); FoldersListRequest nextRequest = FoldersListRequest.builder() .from(request) @@ -151,12 +150,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -185,12 +180,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -207,17 +200,14 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FileStorageFolderResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FileStorageFolderResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -273,16 +263,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Folder.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Folder.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -315,16 +302,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawForceResyncClient.java b/src/main/java/com/merge/api/filestorage/RawForceResyncClient.java index 7ada77eb0..e0224eef9 100644 --- a/src/main/java/com/merge/api/filestorage/RawForceResyncClient.java +++ b/src/main/java/com/merge/api/filestorage/RawForceResyncClient.java @@ -55,18 +55,15 @@ public MergeApiHttpResponse> syncStatusResyncCreate(RequestOpti } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawGenerateKeyClient.java b/src/main/java/com/merge/api/filestorage/RawGenerateKeyClient.java index 77177871f..df781293d 100644 --- a/src/main/java/com/merge/api/filestorage/RawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/filestorage/RawGenerateKeyClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request, } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawGroupsClient.java b/src/main/java/com/merge/api/filestorage/RawGroupsClient.java index 86f67c14f..ed36c2bd6 100644 --- a/src/main/java/com/merge/api/filestorage/RawGroupsClient.java +++ b/src/main/java/com/merge/api/filestorage/RawGroupsClient.java @@ -117,9 +117,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedGroupList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedGroupList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedGroupList.class); Optional startingAfter = parsedResponse.getNext(); GroupsListRequest nextRequest = GroupsListRequest.builder() .from(request) @@ -132,12 +133,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -193,16 +190,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Group.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Group.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawIssuesClient.java b/src/main/java/com/merge/api/filestorage/RawIssuesClient.java index 7eaccfd09..d6122527f 100644 --- a/src/main/java/com/merge/api/filestorage/RawIssuesClient.java +++ b/src/main/java/com/merge/api/filestorage/RawIssuesClient.java @@ -137,9 +137,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedIssueList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedIssueList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedIssueList.class); Optional startingAfter = parsedResponse.getNext(); IssuesListRequest nextRequest = IssuesListRequest.builder() .from(request) @@ -152,12 +153,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -191,16 +188,13 @@ public MergeApiHttpResponse retrieve(String id, RequestOptions requestOpt } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Issue.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Issue.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawLinkTokenClient.java b/src/main/java/com/merge/api/filestorage/RawLinkTokenClient.java index b7de7f977..b2f758882 100644 --- a/src/main/java/com/merge/api/filestorage/RawLinkTokenClient.java +++ b/src/main/java/com/merge/api/filestorage/RawLinkTokenClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(EndUserDetailsRequest request, Req } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), LinkToken.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, LinkToken.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawLinkedAccountsClient.java b/src/main/java/com/merge/api/filestorage/RawLinkedAccountsClient.java index 0fe590c8d..3d1491ad1 100644 --- a/src/main/java/com/merge/api/filestorage/RawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/filestorage/RawLinkedAccountsClient.java @@ -128,9 +128,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAccountDetailsAndActionsList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedAccountDetailsAndActionsList.class); + responseBodyString, PaginatedAccountDetailsAndActionsList.class); Optional startingAfter = parsedResponse.getNext(); LinkedAccountsListRequest nextRequest = LinkedAccountsListRequest.builder() .from(request) @@ -145,12 +146,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawPassthroughClient.java b/src/main/java/com/merge/api/filestorage/RawPassthroughClient.java index eb81ed2e8..e50ed5d07 100644 --- a/src/main/java/com/merge/api/filestorage/RawPassthroughClient.java +++ b/src/main/java/com/merge/api/filestorage/RawPassthroughClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(DataPassthroughRequest reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawRegenerateKeyClient.java b/src/main/java/com/merge/api/filestorage/RawRegenerateKeyClient.java index 11ffdab5f..3742e512f 100644 --- a/src/main/java/com/merge/api/filestorage/RawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/filestorage/RawRegenerateKeyClient.java @@ -65,16 +65,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawScopesClient.java b/src/main/java/com/merge/api/filestorage/RawScopesClient.java index bdc33abbe..f20bf9953 100644 --- a/src/main/java/com/merge/api/filestorage/RawScopesClient.java +++ b/src/main/java/com/merge/api/filestorage/RawScopesClient.java @@ -56,17 +56,13 @@ public MergeApiHttpResponse defaultScopesRetrieve(RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -99,17 +95,13 @@ public MergeApiHttpResponse linkedAccountScopesRetrieve(Req } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -152,17 +144,13 @@ public MergeApiHttpResponse linkedAccountScopesCreate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawSyncStatusClient.java b/src/main/java/com/merge/api/filestorage/RawSyncStatusClient.java index 44d7fe9fd..0dd72e305 100644 --- a/src/main/java/com/merge/api/filestorage/RawSyncStatusClient.java +++ b/src/main/java/com/merge/api/filestorage/RawSyncStatusClient.java @@ -74,9 +74,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedSyncStatusList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedSyncStatusList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedSyncStatusList.class); Optional startingAfter = parsedResponse.getNext(); SyncStatusListRequest nextRequest = SyncStatusListRequest.builder() .from(request) @@ -90,12 +91,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawUsersClient.java b/src/main/java/com/merge/api/filestorage/RawUsersClient.java index 282b07cb5..9ed29f439 100644 --- a/src/main/java/com/merge/api/filestorage/RawUsersClient.java +++ b/src/main/java/com/merge/api/filestorage/RawUsersClient.java @@ -117,9 +117,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedUserList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedUserList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedUserList.class); Optional startingAfter = parsedResponse.getNext(); UsersListRequest nextRequest = UsersListRequest.builder() .from(request) @@ -132,12 +133,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -188,16 +185,13 @@ public MergeApiHttpResponse retrieve(String id, UsersRetrieveRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), User.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, User.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/RawWebhookReceiversClient.java b/src/main/java/com/merge/api/filestorage/RawWebhookReceiversClient.java index 01cff8aaa..0ecdea4f8 100644 --- a/src/main/java/com/merge/api/filestorage/RawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/filestorage/RawWebhookReceiversClient.java @@ -58,18 +58,15 @@ public MergeApiHttpResponse> list(RequestOptions requestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -110,16 +107,13 @@ public MergeApiHttpResponse create(WebhookReceiverRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), WebhookReceiver.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, WebhookReceiver.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/filestorage/types/RemoteData.java b/src/main/java/com/merge/api/filestorage/types/RemoteData.java index e96a73416..6e4a3278d 100644 --- a/src/main/java/com/merge/api/filestorage/types/RemoteData.java +++ b/src/main/java/com/merge/api/filestorage/types/RemoteData.java @@ -42,6 +42,9 @@ public String getPath() { return path; } + /** + * @return The data returned from the third-party for this object in its original, unnormalized format. + */ @JsonProperty("data") public Optional getData() { return data; @@ -88,6 +91,9 @@ public interface PathStage { public interface _FinalStage { RemoteData build(); + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ */ _FinalStage data(Optional data); _FinalStage data(JsonNode data); @@ -123,12 +129,19 @@ public _FinalStage path(@NotNull String path) { return this; } + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage data(JsonNode data) { this.data = Optional.ofNullable(data); return this; } + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ */ @java.lang.Override @JsonSetter(value = "data", nulls = Nulls.SKIP) public _FinalStage data(Optional data) { diff --git a/src/main/java/com/merge/api/hris/AsyncRawAccountDetailsClient.java b/src/main/java/com/merge/api/hris/AsyncRawAccountDetailsClient.java index 275807e28..050d108dc 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawAccountDetailsClient.java @@ -59,18 +59,16 @@ public CompletableFuture> retrieve(RequestO @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountDetails.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountDetails.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawAccountTokenClient.java b/src/main/java/com/merge/api/hris/AsyncRawAccountTokenClient.java index ddf3e2769..7708b0a6f 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawAccountTokenClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawAccountTokenClient.java @@ -61,18 +61,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountToken.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountToken.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawAsyncPassthroughClient.java b/src/main/java/com/merge/api/hris/AsyncRawAsyncPassthroughClient.java index 8ad1c8352..f64fc9e81 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawAsyncPassthroughClient.java @@ -73,19 +73,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughReciept.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughReciept.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -133,19 +130,17 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughRetrieveResponse.class), + responseBodyString, AsyncPassthroughRetrieveResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawAuditTrailClient.java b/src/main/java/com/merge/api/hris/AsyncRawAuditTrailClient.java index fb44a958a..ef309bee9 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawAuditTrailClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawAuditTrailClient.java @@ -99,9 +99,10 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAuditLogEventList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedAuditLogEventList.class); + responseBodyString, PaginatedAuditLogEventList.class); Optional startingAfter = parsedResponse.getNext(); AuditTrailListRequest nextRequest = AuditTrailListRequest.builder() .from(request) @@ -122,12 +123,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawAvailableActionsClient.java b/src/main/java/com/merge/api/hris/AsyncRawAvailableActionsClient.java index 53f1c86bf..3f4c57fdf 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawAvailableActionsClient.java @@ -59,18 +59,16 @@ public CompletableFuture> retrieve(Reques @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AvailableActions.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AvailableActions.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawBankInfoClient.java b/src/main/java/com/merge/api/hris/AsyncRawBankInfoClient.java index d396e3788..52e11ad58 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawBankInfoClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawBankInfoClient.java @@ -149,9 +149,10 @@ public CompletableFuture>> lis @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedBankInfoList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedBankInfoList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedBankInfoList.class); Optional startingAfter = parsedResponse.getNext(); BankInfoListRequest nextRequest = BankInfoListRequest.builder() .from(request) @@ -172,12 +173,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -253,17 +251,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), BankInfo.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, BankInfo.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawBenefitsClient.java b/src/main/java/com/merge/api/hris/AsyncRawBenefitsClient.java index b421bc017..815c375a8 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawBenefitsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawBenefitsClient.java @@ -129,9 +129,10 @@ public CompletableFuture>> list @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedBenefitList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedBenefitList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedBenefitList.class); Optional startingAfter = parsedResponse.getNext(); BenefitsListRequest nextRequest = BenefitsListRequest.builder() .from(request) @@ -152,12 +153,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -225,17 +223,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Benefit.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Benefit.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawCompaniesClient.java b/src/main/java/com/merge/api/hris/AsyncRawCompaniesClient.java index 846e9b4f0..e6ddef4a0 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawCompaniesClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawCompaniesClient.java @@ -121,9 +121,10 @@ public CompletableFuture>> list @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedCompanyList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedCompanyList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedCompanyList.class); Optional startingAfter = parsedResponse.getNext(); CompaniesListRequest nextRequest = CompaniesListRequest.builder() .from(request) @@ -144,12 +145,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -213,17 +211,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Company.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Company.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawDeleteAccountClient.java b/src/main/java/com/merge/api/hris/AsyncRawDeleteAccountClient.java index 2add19910..4c77ace7d 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawDeleteAccountClient.java @@ -63,11 +63,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO return; } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawDependentsClient.java b/src/main/java/com/merge/api/hris/AsyncRawDependentsClient.java index 8b3dccf25..61f554c37 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawDependentsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawDependentsClient.java @@ -128,9 +128,10 @@ public CompletableFuture>> li @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedDependentList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedDependentList.class); + PaginatedDependentList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedDependentList.class); Optional startingAfter = parsedResponse.getNext(); DependentsListRequest nextRequest = DependentsListRequest.builder() .from(request) @@ -151,12 +152,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -227,17 +225,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Dependent.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Dependent.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawEmployeePayrollRunsClient.java b/src/main/java/com/merge/api/hris/AsyncRawEmployeePayrollRunsClient.java index 8885dadba..ed2a06e5a 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawEmployeePayrollRunsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawEmployeePayrollRunsClient.java @@ -151,9 +151,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); EmployeePayrollRunsListRequest nextRequest = EmployeePayrollRunsListRequest.builder() .from(request) @@ -175,12 +176,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -249,18 +247,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), EmployeePayrollRun.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, EmployeePayrollRun.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawEmployeesClient.java b/src/main/java/com/merge/api/hris/AsyncRawEmployeesClient.java index 3168b15de..236fe3f1c 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawEmployeesClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawEmployeesClient.java @@ -23,9 +23,7 @@ import com.merge.api.hris.types.PaginatedEmployeeList; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -225,9 +223,10 @@ public CompletableFuture>> lis @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedEmployeeList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedEmployeeList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedEmployeeList.class); Optional startingAfter = parsedResponse.getNext(); EmployeesListRequest nextRequest = EmployeesListRequest.builder() .from(request) @@ -248,12 +247,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -291,12 +287,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -316,18 +310,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), EmployeeResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, EmployeeResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -410,17 +402,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Employee.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Employee.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -480,11 +470,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO return; } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -529,18 +517,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawEmployerBenefitsClient.java b/src/main/java/com/merge/api/hris/AsyncRawEmployerBenefitsClient.java index d8978ab51..137ae63d9 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawEmployerBenefitsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawEmployerBenefitsClient.java @@ -122,9 +122,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); EmployerBenefitsListRequest nextRequest = EmployerBenefitsListRequest.builder() .from(request) @@ -146,12 +147,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -216,18 +214,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), EmployerBenefit.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, EmployerBenefit.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawEmploymentsClient.java b/src/main/java/com/merge/api/hris/AsyncRawEmploymentsClient.java index 86b332359..36c7b02f9 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawEmploymentsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawEmploymentsClient.java @@ -142,9 +142,10 @@ public CompletableFuture>> l @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedEmploymentList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedEmploymentList.class); + PaginatedEmploymentList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedEmploymentList.class); Optional startingAfter = parsedResponse.getNext(); EmploymentsListRequest nextRequest = EmploymentsListRequest.builder() .from(request) @@ -165,12 +166,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -246,18 +244,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Employment.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Employment.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawFieldMappingClient.java b/src/main/java/com/merge/api/hris/AsyncRawFieldMappingClient.java index 5d6f6c9ea..6fede4f43 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawFieldMappingClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawFieldMappingClient.java @@ -21,8 +21,6 @@ import com.merge.api.hris.types.RemoteFieldApiResponse; import com.merge.api.hris.types.RemoteFieldsRetrieveRequest; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -87,19 +85,17 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingApiInstanceResponse.class), + responseBodyString, FieldMappingApiInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -137,17 +133,10 @@ public CompletableFuture> fie request.getExcludeRemoteFieldMetadata().get(), false); } - Map properties = new HashMap<>(); - properties.put("target_field_name", request.getTargetFieldName()); - properties.put("target_field_description", request.getTargetFieldDescription()); - properties.put("remote_field_traversal_path", request.getRemoteFieldTraversalPath()); - properties.put("remote_method", request.getRemoteMethod()); - properties.put("remote_url_path", request.getRemoteUrlPath()); - properties.put("common_model_name", request.getCommonModelName()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -167,19 +156,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -227,19 +214,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -304,19 +289,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -380,19 +363,16 @@ public CompletableFuture> remoteFie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), RemoteFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteFieldApiResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -438,19 +418,17 @@ public CompletableFuture> t @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), ExternalTargetFieldApiResponse.class), + responseBodyString, ExternalTargetFieldApiResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawForceResyncClient.java b/src/main/java/com/merge/api/hris/AsyncRawForceResyncClient.java index bd854af36..5a6fe6fac 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawForceResyncClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawForceResyncClient.java @@ -63,19 +63,17 @@ public CompletableFuture>> syncStatusResyn @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawGenerateKeyClient.java b/src/main/java/com/merge/api/hris/AsyncRawGenerateKeyClient.java index 88afde0f4..4a4144118 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawGenerateKeyClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawGroupsClient.java b/src/main/java/com/merge/api/hris/AsyncRawGroupsClient.java index 6967fa665..3a172c4f0 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawGroupsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawGroupsClient.java @@ -144,9 +144,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedGroupList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedGroupList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedGroupList.class); Optional startingAfter = parsedResponse.getNext(); GroupsListRequest nextRequest = GroupsListRequest.builder() .from(request) @@ -166,12 +167,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -243,17 +241,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Group.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Group.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawIssuesClient.java b/src/main/java/com/merge/api/hris/AsyncRawIssuesClient.java index f7e148be1..49faf34c9 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawIssuesClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawIssuesClient.java @@ -145,9 +145,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedIssueList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedIssueList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedIssueList.class); Optional startingAfter = parsedResponse.getNext(); IssuesListRequest nextRequest = IssuesListRequest.builder() .from(request) @@ -167,12 +168,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -218,17 +216,15 @@ public CompletableFuture> retrieve(String id, Reques @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Issue.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Issue.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawLinkTokenClient.java b/src/main/java/com/merge/api/hris/AsyncRawLinkTokenClient.java index 7f56c2420..5014baf99 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawLinkTokenClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawLinkTokenClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), LinkToken.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, LinkToken.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawLinkedAccountsClient.java b/src/main/java/com/merge/api/hris/AsyncRawLinkedAccountsClient.java index 854c73838..b651be31e 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawLinkedAccountsClient.java @@ -138,9 +138,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); LinkedAccountsListRequest nextRequest = LinkedAccountsListRequest.builder() .from(request) @@ -162,12 +163,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawLocationsClient.java b/src/main/java/com/merge/api/hris/AsyncRawLocationsClient.java index e5ab7a389..ee38bcc27 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawLocationsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawLocationsClient.java @@ -133,9 +133,10 @@ public CompletableFuture>> lis @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedLocationList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedLocationList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedLocationList.class); Optional startingAfter = parsedResponse.getNext(); LocationsListRequest nextRequest = LocationsListRequest.builder() .from(request) @@ -156,12 +157,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -233,17 +231,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Location.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Location.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawPassthroughClient.java b/src/main/java/com/merge/api/hris/AsyncRawPassthroughClient.java index 746c70f87..8b3634f3f 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawPassthroughClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawPassthroughClient.java @@ -72,18 +72,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawPayGroupsClient.java b/src/main/java/com/merge/api/hris/AsyncRawPayGroupsClient.java index a1a43ec71..2667ee802 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawPayGroupsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawPayGroupsClient.java @@ -121,9 +121,10 @@ public CompletableFuture>> lis @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedPayGroupList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedPayGroupList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedPayGroupList.class); Optional startingAfter = parsedResponse.getNext(); PayGroupsListRequest nextRequest = PayGroupsListRequest.builder() .from(request) @@ -144,12 +145,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -213,17 +211,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PayGroup.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PayGroup.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawPayrollRunsClient.java b/src/main/java/com/merge/api/hris/AsyncRawPayrollRunsClient.java index 4a42c4e9d..3a72d3734 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawPayrollRunsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawPayrollRunsClient.java @@ -150,9 +150,10 @@ public CompletableFuture>> l @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedPayrollRunList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedPayrollRunList.class); + PaginatedPayrollRunList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedPayrollRunList.class); Optional startingAfter = parsedResponse.getNext(); PayrollRunsListRequest nextRequest = PayrollRunsListRequest.builder() .from(request) @@ -173,12 +174,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -250,18 +248,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PayrollRun.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PayrollRun.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawRegenerateKeyClient.java b/src/main/java/com/merge/api/hris/AsyncRawRegenerateKeyClient.java index 1b6d12013..55ed71c55 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawRegenerateKeyClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawScopesClient.java b/src/main/java/com/merge/api/hris/AsyncRawScopesClient.java index cd6fe31e5..772078797 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawScopesClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawScopesClient.java @@ -64,18 +64,16 @@ public CompletableFuture> defaultScope @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -121,18 +119,16 @@ public CompletableFuture> linkedAccoun @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -187,18 +183,16 @@ public CompletableFuture> linkedAccoun @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawSyncStatusClient.java b/src/main/java/com/merge/api/hris/AsyncRawSyncStatusClient.java index c36d44efa..bd757c536 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawSyncStatusClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawSyncStatusClient.java @@ -82,9 +82,10 @@ public CompletableFuture>> l @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedSyncStatusList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedSyncStatusList.class); + PaginatedSyncStatusList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedSyncStatusList.class); Optional startingAfter = parsedResponse.getNext(); SyncStatusListRequest nextRequest = SyncStatusListRequest.builder() .from(request) @@ -105,12 +106,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawTeamsClient.java b/src/main/java/com/merge/api/hris/AsyncRawTeamsClient.java index 0cda15a13..f9ecd2d22 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawTeamsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawTeamsClient.java @@ -129,9 +129,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTeamList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTeamList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTeamList.class); Optional startingAfter = parsedResponse.getNext(); TeamsListRequest nextRequest = TeamsListRequest.builder() .from(request) @@ -151,12 +152,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -224,17 +222,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Team.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Team.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawTimeOffBalancesClient.java b/src/main/java/com/merge/api/hris/AsyncRawTimeOffBalancesClient.java index ac346facc..5c6110e2f 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawTimeOffBalancesClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawTimeOffBalancesClient.java @@ -142,9 +142,10 @@ public CompletableFuture @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTimeOffBalanceList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedTimeOffBalanceList.class); + responseBodyString, PaginatedTimeOffBalanceList.class); Optional startingAfter = parsedResponse.getNext(); TimeOffBalancesListRequest nextRequest = TimeOffBalancesListRequest.builder() .from(request) @@ -166,12 +167,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -248,18 +246,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TimeOffBalance.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TimeOffBalance.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawTimeOffClient.java b/src/main/java/com/merge/api/hris/AsyncRawTimeOffClient.java index a707636ff..7e8bf6439 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawTimeOffClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawTimeOffClient.java @@ -21,9 +21,7 @@ import com.merge.api.hris.types.TimeOffRetrieveRequest; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -172,9 +170,10 @@ public CompletableFuture>> list @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTimeOffList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTimeOffList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTimeOffList.class); Optional startingAfter = parsedResponse.getNext(); TimeOffListRequest nextRequest = TimeOffListRequest.builder() .from(request) @@ -195,12 +194,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -238,12 +234,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -263,18 +257,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TimeOffResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TimeOffResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -350,17 +342,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TimeOff.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TimeOff.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -405,18 +395,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawTimesheetEntriesClient.java b/src/main/java/com/merge/api/hris/AsyncRawTimesheetEntriesClient.java index fd1099107..a5f352d57 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawTimesheetEntriesClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawTimesheetEntriesClient.java @@ -21,9 +21,7 @@ import com.merge.api.hris.types.TimesheetEntryResponse; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -157,9 +155,10 @@ public CompletableFuture @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTimesheetEntryList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedTimesheetEntryList.class); + responseBodyString, PaginatedTimesheetEntryList.class); Optional startingAfter = parsedResponse.getNext(); TimesheetEntriesListRequest nextRequest = TimesheetEntriesListRequest.builder() .from(request) @@ -181,12 +180,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -225,12 +221,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -250,19 +244,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), TimesheetEntryResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TimesheetEntryResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -331,18 +322,16 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TimesheetEntry.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TimesheetEntry.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -387,18 +376,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/AsyncRawWebhookReceiversClient.java b/src/main/java/com/merge/api/hris/AsyncRawWebhookReceiversClient.java index 27c07d12d..dea7d405e 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawWebhookReceiversClient.java @@ -65,19 +65,17 @@ public CompletableFuture>> list(Reque @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -131,18 +129,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), WebhookReceiver.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, WebhookReceiver.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/hris/RawAccountDetailsClient.java b/src/main/java/com/merge/api/hris/RawAccountDetailsClient.java index 9ddafde1d..1985ef072 100644 --- a/src/main/java/com/merge/api/hris/RawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/hris/RawAccountDetailsClient.java @@ -52,16 +52,13 @@ public MergeApiHttpResponse retrieve(RequestOptions requestOptio } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountDetails.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountDetails.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawAccountTokenClient.java b/src/main/java/com/merge/api/hris/RawAccountTokenClient.java index 0e16fac96..3b4f95680 100644 --- a/src/main/java/com/merge/api/hris/RawAccountTokenClient.java +++ b/src/main/java/com/merge/api/hris/RawAccountTokenClient.java @@ -53,16 +53,13 @@ public MergeApiHttpResponse retrieve(String publicToken, RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountToken.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountToken.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawAsyncPassthroughClient.java b/src/main/java/com/merge/api/hris/RawAsyncPassthroughClient.java index 3c05abaec..8d83d82e2 100644 --- a/src/main/java/com/merge/api/hris/RawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/hris/RawAsyncPassthroughClient.java @@ -66,17 +66,14 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AsyncPassthroughReciept.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughReciept.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -111,18 +108,14 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughRetrieveResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughRetrieveResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawAuditTrailClient.java b/src/main/java/com/merge/api/hris/RawAuditTrailClient.java index 16817f8f7..eb3d1cce8 100644 --- a/src/main/java/com/merge/api/hris/RawAuditTrailClient.java +++ b/src/main/java/com/merge/api/hris/RawAuditTrailClient.java @@ -90,9 +90,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAuditLogEventList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedAuditLogEventList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAuditLogEventList.class); Optional startingAfter = parsedResponse.getNext(); AuditTrailListRequest nextRequest = AuditTrailListRequest.builder() .from(request) @@ -106,12 +107,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawAvailableActionsClient.java b/src/main/java/com/merge/api/hris/RawAvailableActionsClient.java index 43bd22aed..d33b08785 100644 --- a/src/main/java/com/merge/api/hris/RawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/hris/RawAvailableActionsClient.java @@ -52,16 +52,13 @@ public MergeApiHttpResponse retrieve(RequestOptions requestOpt } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AvailableActions.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AvailableActions.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawBankInfoClient.java b/src/main/java/com/merge/api/hris/RawBankInfoClient.java index 4f73b54e5..4cab73bc4 100644 --- a/src/main/java/com/merge/api/hris/RawBankInfoClient.java +++ b/src/main/java/com/merge/api/hris/RawBankInfoClient.java @@ -141,9 +141,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedBankInfoList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedBankInfoList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedBankInfoList.class); Optional startingAfter = parsedResponse.getNext(); BankInfoListRequest nextRequest = BankInfoListRequest.builder() .from(request) @@ -156,12 +157,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -225,16 +222,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), BankInfo.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, BankInfo.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawBenefitsClient.java b/src/main/java/com/merge/api/hris/RawBenefitsClient.java index c27e71dca..f291e6847 100644 --- a/src/main/java/com/merge/api/hris/RawBenefitsClient.java +++ b/src/main/java/com/merge/api/hris/RawBenefitsClient.java @@ -121,9 +121,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedBenefitList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedBenefitList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedBenefitList.class); Optional startingAfter = parsedResponse.getNext(); BenefitsListRequest nextRequest = BenefitsListRequest.builder() .from(request) @@ -136,12 +137,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -197,16 +194,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Benefit.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Benefit.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawCompaniesClient.java b/src/main/java/com/merge/api/hris/RawCompaniesClient.java index 45455a446..442ebb5bf 100644 --- a/src/main/java/com/merge/api/hris/RawCompaniesClient.java +++ b/src/main/java/com/merge/api/hris/RawCompaniesClient.java @@ -113,9 +113,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedCompanyList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedCompanyList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedCompanyList.class); Optional startingAfter = parsedResponse.getNext(); CompaniesListRequest nextRequest = CompaniesListRequest.builder() .from(request) @@ -128,12 +129,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -185,16 +182,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Company.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Company.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawDeleteAccountClient.java b/src/main/java/com/merge/api/hris/RawDeleteAccountClient.java index 3cb5ea479..018239117 100644 --- a/src/main/java/com/merge/api/hris/RawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/hris/RawDeleteAccountClient.java @@ -55,11 +55,8 @@ public MergeApiHttpResponse delete(RequestOptions requestOptions) { return new MergeApiHttpResponse<>(null, response); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawDependentsClient.java b/src/main/java/com/merge/api/hris/RawDependentsClient.java index 895bad81d..fa82435c8 100644 --- a/src/main/java/com/merge/api/hris/RawDependentsClient.java +++ b/src/main/java/com/merge/api/hris/RawDependentsClient.java @@ -120,9 +120,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedDependentList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedDependentList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedDependentList.class); Optional startingAfter = parsedResponse.getNext(); DependentsListRequest nextRequest = DependentsListRequest.builder() .from(request) @@ -135,12 +136,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -199,16 +196,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Dependent.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Dependent.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawEmployeePayrollRunsClient.java b/src/main/java/com/merge/api/hris/RawEmployeePayrollRunsClient.java index efe2db4fa..0ef93a9b4 100644 --- a/src/main/java/com/merge/api/hris/RawEmployeePayrollRunsClient.java +++ b/src/main/java/com/merge/api/hris/RawEmployeePayrollRunsClient.java @@ -141,9 +141,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedEmployeePayrollRunList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedEmployeePayrollRunList.class); + PaginatedEmployeePayrollRunList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedEmployeePayrollRunList.class); Optional startingAfter = parsedResponse.getNext(); EmployeePayrollRunsListRequest nextRequest = EmployeePayrollRunsListRequest.builder() .from(request) @@ -157,12 +158,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -218,16 +215,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), EmployeePayrollRun.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, EmployeePayrollRun.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawEmployeesClient.java b/src/main/java/com/merge/api/hris/RawEmployeesClient.java index 308955eb5..9959890ac 100644 --- a/src/main/java/com/merge/api/hris/RawEmployeesClient.java +++ b/src/main/java/com/merge/api/hris/RawEmployeesClient.java @@ -23,9 +23,7 @@ import com.merge.api.hris.types.PaginatedEmployeeList; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -217,9 +215,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedEmployeeList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedEmployeeList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedEmployeeList.class); Optional startingAfter = parsedResponse.getNext(); EmployeesListRequest nextRequest = EmployeesListRequest.builder() .from(request) @@ -232,12 +231,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -266,12 +261,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -288,16 +281,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), EmployeeResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, EmployeeResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -368,16 +358,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Employee.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Employee.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -423,11 +410,8 @@ public MergeApiHttpResponse ignoreCreate( return new MergeApiHttpResponse<>(null, response); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -460,16 +444,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawEmployerBenefitsClient.java b/src/main/java/com/merge/api/hris/RawEmployerBenefitsClient.java index 63bc9bfbe..8b1a95d0e 100644 --- a/src/main/java/com/merge/api/hris/RawEmployerBenefitsClient.java +++ b/src/main/java/com/merge/api/hris/RawEmployerBenefitsClient.java @@ -113,9 +113,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedEmployerBenefitList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedEmployerBenefitList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedEmployerBenefitList.class); Optional startingAfter = parsedResponse.getNext(); EmployerBenefitsListRequest nextRequest = EmployerBenefitsListRequest.builder() .from(request) @@ -129,12 +130,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -186,16 +183,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), EmployerBenefit.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, EmployerBenefit.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawEmploymentsClient.java b/src/main/java/com/merge/api/hris/RawEmploymentsClient.java index 2aa345b5e..1a2efa954 100644 --- a/src/main/java/com/merge/api/hris/RawEmploymentsClient.java +++ b/src/main/java/com/merge/api/hris/RawEmploymentsClient.java @@ -133,9 +133,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedEmploymentList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedEmploymentList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedEmploymentList.class); Optional startingAfter = parsedResponse.getNext(); EmploymentsListRequest nextRequest = EmploymentsListRequest.builder() .from(request) @@ -149,12 +150,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -218,16 +215,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Employment.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Employment.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawFieldMappingClient.java b/src/main/java/com/merge/api/hris/RawFieldMappingClient.java index a018105b7..72d740424 100644 --- a/src/main/java/com/merge/api/hris/RawFieldMappingClient.java +++ b/src/main/java/com/merge/api/hris/RawFieldMappingClient.java @@ -21,8 +21,6 @@ import com.merge.api.hris.types.RemoteFieldApiResponse; import com.merge.api.hris.types.RemoteFieldsRetrieveRequest; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -80,18 +78,14 @@ public MergeApiHttpResponse fieldMappingsRetrie } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingApiInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingApiInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -119,17 +113,10 @@ public MergeApiHttpResponse fieldMappingsCreate( request.getExcludeRemoteFieldMetadata().get(), false); } - Map properties = new HashMap<>(); - properties.put("target_field_name", request.getTargetFieldName()); - properties.put("target_field_description", request.getTargetFieldDescription()); - properties.put("remote_field_traversal_path", request.getRemoteFieldTraversalPath()); - properties.put("remote_method", request.getRemoteMethod()); - properties.put("remote_url_path", request.getRemoteUrlPath()); - properties.put("common_model_name", request.getCommonModelName()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -146,17 +133,14 @@ public MergeApiHttpResponse fieldMappingsCreate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -191,17 +175,14 @@ public MergeApiHttpResponse fieldMappingsDestroy( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -253,17 +234,14 @@ public MergeApiHttpResponse fieldMappingsPartialUp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -314,17 +292,14 @@ public MergeApiHttpResponse remoteFieldsRetrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteFieldApiResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -357,18 +332,14 @@ public MergeApiHttpResponse targetFieldsRetrieve } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), ExternalTargetFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ExternalTargetFieldApiResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawForceResyncClient.java b/src/main/java/com/merge/api/hris/RawForceResyncClient.java index 9ab174d8e..f9cef2c28 100644 --- a/src/main/java/com/merge/api/hris/RawForceResyncClient.java +++ b/src/main/java/com/merge/api/hris/RawForceResyncClient.java @@ -55,18 +55,15 @@ public MergeApiHttpResponse> syncStatusResyncCreate(RequestOpti } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawGenerateKeyClient.java b/src/main/java/com/merge/api/hris/RawGenerateKeyClient.java index 484f787cc..70c883578 100644 --- a/src/main/java/com/merge/api/hris/RawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/hris/RawGenerateKeyClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request, } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawGroupsClient.java b/src/main/java/com/merge/api/hris/RawGroupsClient.java index 6dc69d9f7..7d097ea32 100644 --- a/src/main/java/com/merge/api/hris/RawGroupsClient.java +++ b/src/main/java/com/merge/api/hris/RawGroupsClient.java @@ -136,9 +136,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedGroupList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedGroupList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedGroupList.class); Optional startingAfter = parsedResponse.getNext(); GroupsListRequest nextRequest = GroupsListRequest.builder() .from(request) @@ -151,12 +152,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -216,16 +213,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Group.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Group.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawIssuesClient.java b/src/main/java/com/merge/api/hris/RawIssuesClient.java index 1c753f97f..c85a1cf0a 100644 --- a/src/main/java/com/merge/api/hris/RawIssuesClient.java +++ b/src/main/java/com/merge/api/hris/RawIssuesClient.java @@ -137,9 +137,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedIssueList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedIssueList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedIssueList.class); Optional startingAfter = parsedResponse.getNext(); IssuesListRequest nextRequest = IssuesListRequest.builder() .from(request) @@ -152,12 +153,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -191,16 +188,13 @@ public MergeApiHttpResponse retrieve(String id, RequestOptions requestOpt } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Issue.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Issue.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawLinkTokenClient.java b/src/main/java/com/merge/api/hris/RawLinkTokenClient.java index 19979b229..f300f52d3 100644 --- a/src/main/java/com/merge/api/hris/RawLinkTokenClient.java +++ b/src/main/java/com/merge/api/hris/RawLinkTokenClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(EndUserDetailsRequest request, Req } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), LinkToken.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, LinkToken.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawLinkedAccountsClient.java b/src/main/java/com/merge/api/hris/RawLinkedAccountsClient.java index 93d246df2..21a91c587 100644 --- a/src/main/java/com/merge/api/hris/RawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/hris/RawLinkedAccountsClient.java @@ -128,9 +128,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAccountDetailsAndActionsList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedAccountDetailsAndActionsList.class); + responseBodyString, PaginatedAccountDetailsAndActionsList.class); Optional startingAfter = parsedResponse.getNext(); LinkedAccountsListRequest nextRequest = LinkedAccountsListRequest.builder() .from(request) @@ -145,12 +146,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawLocationsClient.java b/src/main/java/com/merge/api/hris/RawLocationsClient.java index 08ac35f54..c2a42ee1a 100644 --- a/src/main/java/com/merge/api/hris/RawLocationsClient.java +++ b/src/main/java/com/merge/api/hris/RawLocationsClient.java @@ -125,9 +125,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedLocationList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedLocationList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedLocationList.class); Optional startingAfter = parsedResponse.getNext(); LocationsListRequest nextRequest = LocationsListRequest.builder() .from(request) @@ -140,12 +141,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -205,16 +202,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Location.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Location.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawPassthroughClient.java b/src/main/java/com/merge/api/hris/RawPassthroughClient.java index e8e662f6d..8323ad3cc 100644 --- a/src/main/java/com/merge/api/hris/RawPassthroughClient.java +++ b/src/main/java/com/merge/api/hris/RawPassthroughClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(DataPassthroughRequest reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawPayGroupsClient.java b/src/main/java/com/merge/api/hris/RawPayGroupsClient.java index 6407b80b1..7a0fffd53 100644 --- a/src/main/java/com/merge/api/hris/RawPayGroupsClient.java +++ b/src/main/java/com/merge/api/hris/RawPayGroupsClient.java @@ -113,9 +113,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedPayGroupList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedPayGroupList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedPayGroupList.class); Optional startingAfter = parsedResponse.getNext(); PayGroupsListRequest nextRequest = PayGroupsListRequest.builder() .from(request) @@ -128,12 +129,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -185,16 +182,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PayGroup.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PayGroup.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawPayrollRunsClient.java b/src/main/java/com/merge/api/hris/RawPayrollRunsClient.java index 29d1841b5..76037440d 100644 --- a/src/main/java/com/merge/api/hris/RawPayrollRunsClient.java +++ b/src/main/java/com/merge/api/hris/RawPayrollRunsClient.java @@ -141,9 +141,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedPayrollRunList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedPayrollRunList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedPayrollRunList.class); Optional startingAfter = parsedResponse.getNext(); PayrollRunsListRequest nextRequest = PayrollRunsListRequest.builder() .from(request) @@ -157,12 +158,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -222,16 +219,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PayrollRun.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PayrollRun.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawRegenerateKeyClient.java b/src/main/java/com/merge/api/hris/RawRegenerateKeyClient.java index ca1c148d6..61eae4e54 100644 --- a/src/main/java/com/merge/api/hris/RawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/hris/RawRegenerateKeyClient.java @@ -65,16 +65,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawScopesClient.java b/src/main/java/com/merge/api/hris/RawScopesClient.java index ac4d9c26a..a3b4ea144 100644 --- a/src/main/java/com/merge/api/hris/RawScopesClient.java +++ b/src/main/java/com/merge/api/hris/RawScopesClient.java @@ -56,17 +56,13 @@ public MergeApiHttpResponse defaultScopesRetrieve(RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -99,17 +95,13 @@ public MergeApiHttpResponse linkedAccountScopesRetrieve(Req } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -152,17 +144,13 @@ public MergeApiHttpResponse linkedAccountScopesCreate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawSyncStatusClient.java b/src/main/java/com/merge/api/hris/RawSyncStatusClient.java index 233ee3ebc..858fa9b94 100644 --- a/src/main/java/com/merge/api/hris/RawSyncStatusClient.java +++ b/src/main/java/com/merge/api/hris/RawSyncStatusClient.java @@ -74,9 +74,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedSyncStatusList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedSyncStatusList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedSyncStatusList.class); Optional startingAfter = parsedResponse.getNext(); SyncStatusListRequest nextRequest = SyncStatusListRequest.builder() .from(request) @@ -90,12 +91,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawTeamsClient.java b/src/main/java/com/merge/api/hris/RawTeamsClient.java index ab0c4c26a..445494260 100644 --- a/src/main/java/com/merge/api/hris/RawTeamsClient.java +++ b/src/main/java/com/merge/api/hris/RawTeamsClient.java @@ -121,9 +121,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTeamList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTeamList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTeamList.class); Optional startingAfter = parsedResponse.getNext(); TeamsListRequest nextRequest = TeamsListRequest.builder() .from(request) @@ -136,12 +137,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -196,16 +193,13 @@ public MergeApiHttpResponse retrieve(String id, TeamsRetrieveRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Team.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Team.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawTimeOffBalancesClient.java b/src/main/java/com/merge/api/hris/RawTimeOffBalancesClient.java index 56bb0950f..bd375212d 100644 --- a/src/main/java/com/merge/api/hris/RawTimeOffBalancesClient.java +++ b/src/main/java/com/merge/api/hris/RawTimeOffBalancesClient.java @@ -133,9 +133,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTimeOffBalanceList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTimeOffBalanceList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTimeOffBalanceList.class); Optional startingAfter = parsedResponse.getNext(); TimeOffBalancesListRequest nextRequest = TimeOffBalancesListRequest.builder() .from(request) @@ -149,12 +150,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -218,16 +215,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TimeOffBalance.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TimeOffBalance.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawTimeOffClient.java b/src/main/java/com/merge/api/hris/RawTimeOffClient.java index 7d00737d8..f8ea274a6 100644 --- a/src/main/java/com/merge/api/hris/RawTimeOffClient.java +++ b/src/main/java/com/merge/api/hris/RawTimeOffClient.java @@ -21,9 +21,7 @@ import com.merge.api.hris.types.TimeOffRetrieveRequest; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -164,9 +162,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTimeOffList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTimeOffList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTimeOffList.class); Optional startingAfter = parsedResponse.getNext(); TimeOffListRequest nextRequest = TimeOffListRequest.builder() .from(request) @@ -179,12 +178,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -212,12 +207,10 @@ public MergeApiHttpResponse create(TimeOffEndpointRequest reque QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -234,16 +227,13 @@ public MergeApiHttpResponse create(TimeOffEndpointRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TimeOffResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TimeOffResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -307,16 +297,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TimeOff.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TimeOff.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -349,16 +336,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawTimesheetEntriesClient.java b/src/main/java/com/merge/api/hris/RawTimesheetEntriesClient.java index ad3672462..94db14d07 100644 --- a/src/main/java/com/merge/api/hris/RawTimesheetEntriesClient.java +++ b/src/main/java/com/merge/api/hris/RawTimesheetEntriesClient.java @@ -21,9 +21,7 @@ import com.merge.api.hris.types.TimesheetEntryResponse; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -148,9 +146,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTimesheetEntryList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTimesheetEntryList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTimesheetEntryList.class); Optional startingAfter = parsedResponse.getNext(); TimesheetEntriesListRequest nextRequest = TimesheetEntriesListRequest.builder() .from(request) @@ -164,12 +163,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -198,12 +193,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -220,17 +213,14 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TimesheetEntryResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TimesheetEntryResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -286,16 +276,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TimesheetEntry.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TimesheetEntry.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -328,16 +315,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/RawWebhookReceiversClient.java b/src/main/java/com/merge/api/hris/RawWebhookReceiversClient.java index f1ea223f2..a86c8fce4 100644 --- a/src/main/java/com/merge/api/hris/RawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/hris/RawWebhookReceiversClient.java @@ -58,18 +58,15 @@ public MergeApiHttpResponse> list(RequestOptions requestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -110,16 +107,13 @@ public MergeApiHttpResponse create(WebhookReceiverRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), WebhookReceiver.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, WebhookReceiver.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/hris/types/RemoteData.java b/src/main/java/com/merge/api/hris/types/RemoteData.java index 7ab1bdbfa..843b8bdb8 100644 --- a/src/main/java/com/merge/api/hris/types/RemoteData.java +++ b/src/main/java/com/merge/api/hris/types/RemoteData.java @@ -42,6 +42,9 @@ public String getPath() { return path; } + /** + * @return The data returned from the third-party for this object in its original, unnormalized format. + */ @JsonProperty("data") public Optional getData() { return data; @@ -88,6 +91,9 @@ public interface PathStage { public interface _FinalStage { RemoteData build(); + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ */ _FinalStage data(Optional data); _FinalStage data(JsonNode data); @@ -123,12 +129,19 @@ public _FinalStage path(@NotNull String path) { return this; } + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage data(JsonNode data) { this.data = Optional.ofNullable(data); return this; } + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ */ @java.lang.Override @JsonSetter(value = "data", nulls = Nulls.SKIP) public _FinalStage data(Optional data) { diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawAccountDetailsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawAccountDetailsClient.java index 4a87072e7..a9b4d938c 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawAccountDetailsClient.java @@ -59,18 +59,16 @@ public CompletableFuture> retrieve(RequestO @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountDetails.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountDetails.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawAccountTokenClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawAccountTokenClient.java index d90edf025..bf14f0bef 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawAccountTokenClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawAccountTokenClient.java @@ -61,18 +61,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountToken.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountToken.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawAccountsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawAccountsClient.java index 9a00464cd..af61b6475 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawAccountsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawAccountsClient.java @@ -121,9 +121,10 @@ public CompletableFuture>> list @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAccountList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedAccountList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAccountList.class); Optional startingAfter = parsedResponse.getNext(); AccountsListRequest nextRequest = AccountsListRequest.builder() .from(request) @@ -144,12 +145,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -213,17 +211,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Account.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Account.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawAsyncPassthroughClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawAsyncPassthroughClient.java index 9365dede5..20b8cc208 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawAsyncPassthroughClient.java @@ -73,19 +73,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughReciept.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughReciept.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -133,19 +130,17 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughRetrieveResponse.class), + responseBodyString, AsyncPassthroughRetrieveResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawAttachmentsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawAttachmentsClient.java index 033331375..05430d458 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawAttachmentsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawAttachmentsClient.java @@ -24,9 +24,7 @@ import java.io.IOException; import java.io.InputStream; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -147,9 +145,10 @@ public CompletableFuture>> l @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedAttachmentList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedAttachmentList.class); + PaginatedAttachmentList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAttachmentList.class); Optional startingAfter = parsedResponse.getNext(); AttachmentsListRequest nextRequest = AttachmentsListRequest.builder() .from(request) @@ -170,12 +169,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -214,12 +210,10 @@ public CompletableFuture> crea QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -239,19 +233,17 @@ public CompletableFuture> crea @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), TicketingAttachmentResponse.class), + responseBodyString, TicketingAttachmentResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -319,18 +311,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Attachment.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Attachment.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -398,11 +387,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO return; } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -447,18 +434,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawAuditTrailClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawAuditTrailClient.java index 59ba55c29..5a9ad0f76 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawAuditTrailClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawAuditTrailClient.java @@ -99,9 +99,10 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAuditLogEventList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedAuditLogEventList.class); + responseBodyString, PaginatedAuditLogEventList.class); Optional startingAfter = parsedResponse.getNext(); AuditTrailListRequest nextRequest = AuditTrailListRequest.builder() .from(request) @@ -122,12 +123,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawAvailableActionsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawAvailableActionsClient.java index ff2864a31..91bea9ca5 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawAvailableActionsClient.java @@ -59,18 +59,16 @@ public CompletableFuture> retrieve(Reques @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AvailableActions.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AvailableActions.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawCollectionsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawCollectionsClient.java index 18805a15c..43399da29 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawCollectionsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawCollectionsClient.java @@ -152,9 +152,10 @@ public CompletableFuture>> l @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedCollectionList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedCollectionList.class); + PaginatedCollectionList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedCollectionList.class); Optional startingAfter = parsedResponse.getNext(); CollectionsListRequest nextRequest = CollectionsListRequest.builder() .from(request) @@ -175,12 +176,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -265,9 +263,10 @@ public CompletableFuture>> viewe @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedViewerList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedViewerList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedViewerList.class); Optional startingAfter = parsedResponse.getNext(); CollectionsViewersListRequest nextRequest = CollectionsViewersListRequest.builder() .from(request) @@ -288,12 +287,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -369,18 +365,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Collection.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Collection.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawCommentsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawCommentsClient.java index 7b06ac94e..435f8da8e 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawCommentsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawCommentsClient.java @@ -21,9 +21,7 @@ import com.merge.api.ticketing.types.PaginatedCommentList; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -143,9 +141,10 @@ public CompletableFuture>> list @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedCommentList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedCommentList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedCommentList.class); Optional startingAfter = parsedResponse.getNext(); CommentsListRequest nextRequest = CommentsListRequest.builder() .from(request) @@ -166,12 +165,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -209,12 +205,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -234,18 +228,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommentResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommentResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -313,17 +305,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Comment.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Comment.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -368,18 +358,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawContactsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawContactsClient.java index 3e554c2fa..05cd3a64f 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawContactsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawContactsClient.java @@ -21,9 +21,7 @@ import com.merge.api.ticketing.types.TicketingContactResponse; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -136,9 +134,10 @@ public CompletableFuture>> list @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedContactList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedContactList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedContactList.class); Optional startingAfter = parsedResponse.getNext(); ContactsListRequest nextRequest = ContactsListRequest.builder() .from(request) @@ -159,12 +158,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -203,12 +199,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -228,19 +222,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), TicketingContactResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TicketingContactResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -308,17 +299,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Contact.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Contact.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -363,18 +352,15 @@ public CompletableFuture> metaPostRetrieve(Re @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawDeleteAccountClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawDeleteAccountClient.java index 2f99902ba..121c8fb7b 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawDeleteAccountClient.java @@ -63,11 +63,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO return; } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawFieldMappingClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawFieldMappingClient.java index 9648e816d..bb7ddadc3 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawFieldMappingClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawFieldMappingClient.java @@ -21,8 +21,6 @@ import com.merge.api.ticketing.types.RemoteFieldApiResponse; import com.merge.api.ticketing.types.RemoteFieldsRetrieveRequest; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -87,19 +85,17 @@ public CompletableFuture> @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingApiInstanceResponse.class), + responseBodyString, FieldMappingApiInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -137,17 +133,10 @@ public CompletableFuture> fie request.getExcludeRemoteFieldMetadata().get(), false); } - Map properties = new HashMap<>(); - properties.put("target_field_name", request.getTargetFieldName()); - properties.put("target_field_description", request.getTargetFieldDescription()); - properties.put("remote_field_traversal_path", request.getRemoteFieldTraversalPath()); - properties.put("remote_method", request.getRemoteMethod()); - properties.put("remote_url_path", request.getRemoteUrlPath()); - properties.put("common_model_name", request.getCommonModelName()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -167,19 +156,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -227,19 +214,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -304,19 +289,17 @@ public CompletableFuture> fie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingInstanceResponse.class), + responseBodyString, FieldMappingInstanceResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -380,19 +363,16 @@ public CompletableFuture> remoteFie @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), RemoteFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteFieldApiResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -438,19 +418,17 @@ public CompletableFuture> t @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), ExternalTargetFieldApiResponse.class), + responseBodyString, ExternalTargetFieldApiResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawForceResyncClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawForceResyncClient.java index dd87696eb..6baa37762 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawForceResyncClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawForceResyncClient.java @@ -63,19 +63,17 @@ public CompletableFuture>> syncStatusResyn @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawGenerateKeyClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawGenerateKeyClient.java index 10620d0bb..867e6cedd 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawGenerateKeyClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawIssuesClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawIssuesClient.java index 806d4c43b..f173f29ec 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawIssuesClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawIssuesClient.java @@ -145,9 +145,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedIssueList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedIssueList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedIssueList.class); Optional startingAfter = parsedResponse.getNext(); IssuesListRequest nextRequest = IssuesListRequest.builder() .from(request) @@ -167,12 +168,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -218,17 +216,15 @@ public CompletableFuture> retrieve(String id, Reques @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Issue.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Issue.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawLinkTokenClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawLinkTokenClient.java index 1cb2ef480..901d5b546 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawLinkTokenClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawLinkTokenClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), LinkToken.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, LinkToken.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawLinkedAccountsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawLinkedAccountsClient.java index 1cdf01645..c7d3fd1fe 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawLinkedAccountsClient.java @@ -138,9 +138,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); LinkedAccountsListRequest nextRequest = LinkedAccountsListRequest.builder() .from(request) @@ -162,12 +163,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawPassthroughClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawPassthroughClient.java index 8f061e1f6..b9dae3958 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawPassthroughClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawPassthroughClient.java @@ -72,18 +72,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawProjectsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawProjectsClient.java index aa8519c2c..d13e9bc01 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawProjectsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawProjectsClient.java @@ -124,9 +124,10 @@ public CompletableFuture>> list @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedProjectList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedProjectList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedProjectList.class); Optional startingAfter = parsedResponse.getNext(); ProjectsListRequest nextRequest = ProjectsListRequest.builder() .from(request) @@ -147,12 +148,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -216,17 +214,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Project.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Project.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -311,9 +307,10 @@ public CompletableFuture>> usersLi @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedUserList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedUserList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedUserList.class); Optional startingAfter = parsedResponse.getNext(); ProjectsUsersListRequest nextRequest = ProjectsUsersListRequest.builder() .from(request) @@ -333,12 +330,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawRegenerateKeyClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawRegenerateKeyClient.java index 234ea77c8..cab816b1b 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawRegenerateKeyClient.java @@ -72,17 +72,15 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawRolesClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawRolesClient.java index cc2b2c286..c2b64140d 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawRolesClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawRolesClient.java @@ -121,9 +121,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRoleList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRoleList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRoleList.class); Optional startingAfter = parsedResponse.getNext(); RolesListRequest nextRequest = RolesListRequest.builder() .from(request) @@ -143,12 +144,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -212,17 +210,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Role.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Role.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawScopesClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawScopesClient.java index 677b22cfa..0d9a4a0b5 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawScopesClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawScopesClient.java @@ -64,18 +64,16 @@ public CompletableFuture> defaultScope @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -121,18 +119,16 @@ public CompletableFuture> linkedAccoun @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -187,18 +183,16 @@ public CompletableFuture> linkedAccoun @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawSyncStatusClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawSyncStatusClient.java index 1bac10ee3..712880bd3 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawSyncStatusClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawSyncStatusClient.java @@ -82,9 +82,10 @@ public CompletableFuture>> l @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - PaginatedSyncStatusList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedSyncStatusList.class); + PaginatedSyncStatusList parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedSyncStatusList.class); Optional startingAfter = parsedResponse.getNext(); SyncStatusListRequest nextRequest = SyncStatusListRequest.builder() .from(request) @@ -105,12 +106,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawTagsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawTagsClient.java index 281cfd46d..ca7d76cb4 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawTagsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawTagsClient.java @@ -121,9 +121,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTagList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTagList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTagList.class); Optional startingAfter = parsedResponse.getNext(); TagsListRequest nextRequest = TagsListRequest.builder() .from(request) @@ -143,12 +144,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -212,17 +210,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Tag.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Tag.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawTeamsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawTeamsClient.java index 39609a03b..3b3c7116e 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawTeamsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawTeamsClient.java @@ -121,9 +121,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTeamList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTeamList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTeamList.class); Optional startingAfter = parsedResponse.getNext(); TeamsListRequest nextRequest = TeamsListRequest.builder() .from(request) @@ -143,12 +144,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -212,17 +210,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Team.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Team.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawTicketsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawTicketsClient.java index 58931016b..39fa79ee0 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawTicketsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawTicketsClient.java @@ -29,9 +29,7 @@ import com.merge.api.ticketing.types.Viewer; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -251,9 +249,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTicketList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTicketList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTicketList.class); Optional startingAfter = parsedResponse.getNext(); TicketsListRequest nextRequest = TicketsListRequest.builder() .from(request) @@ -274,12 +273,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -317,12 +313,10 @@ public CompletableFuture> create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -342,18 +336,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TicketResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TicketResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -436,17 +428,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Ticket.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Ticket.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -486,12 +476,10 @@ public CompletableFuture> partialUpdate( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -511,18 +499,16 @@ public CompletableFuture> partialUpdate( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TicketResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TicketResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -607,9 +593,10 @@ public CompletableFuture>> viewe @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedViewerList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedViewerList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedViewerList.class); Optional startingAfter = parsedResponse.getNext(); TicketsViewersListRequest nextRequest = TicketsViewersListRequest.builder() .from(request) @@ -630,12 +617,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -682,18 +666,15 @@ public CompletableFuture> metaPatchRetrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -754,18 +735,15 @@ public CompletableFuture> metaPostRetrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), - response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -860,9 +838,10 @@ public CompletableFuture startingAfter = parsedResponse.getNext(); TicketsRemoteFieldClassesListRequest nextRequest = TicketsRemoteFieldClassesListRequest.builder() @@ -885,12 +864,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawUsersClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawUsersClient.java index a0f09cbef..d6247727b 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawUsersClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawUsersClient.java @@ -133,9 +133,10 @@ public CompletableFuture>> list( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedUserList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedUserList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedUserList.class); Optional startingAfter = parsedResponse.getNext(); UsersListRequest nextRequest = UsersListRequest.builder() .from(request) @@ -155,12 +156,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -228,17 +226,15 @@ public CompletableFuture> retrieve( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), User.class), response)); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, User.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawWebhookReceiversClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawWebhookReceiversClient.java index b7d70910e..df4e27140 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawWebhookReceiversClient.java @@ -65,19 +65,17 @@ public CompletableFuture>> list(Reque @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); @@ -131,18 +129,16 @@ public CompletableFuture> create( @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), WebhookReceiver.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, WebhookReceiver.class), response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); future.completeExceptionally(new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); + "Error with status code " + response.code(), response.code(), errorBody, response)); return; } catch (IOException e) { future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); diff --git a/src/main/java/com/merge/api/ticketing/RawAccountDetailsClient.java b/src/main/java/com/merge/api/ticketing/RawAccountDetailsClient.java index f793a8cb5..4064710e1 100644 --- a/src/main/java/com/merge/api/ticketing/RawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawAccountDetailsClient.java @@ -52,16 +52,13 @@ public MergeApiHttpResponse retrieve(RequestOptions requestOptio } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountDetails.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountDetails.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawAccountTokenClient.java b/src/main/java/com/merge/api/ticketing/RawAccountTokenClient.java index e8d4587f9..924b07114 100644 --- a/src/main/java/com/merge/api/ticketing/RawAccountTokenClient.java +++ b/src/main/java/com/merge/api/ticketing/RawAccountTokenClient.java @@ -53,16 +53,13 @@ public MergeApiHttpResponse retrieve(String publicToken, RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AccountToken.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AccountToken.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawAccountsClient.java b/src/main/java/com/merge/api/ticketing/RawAccountsClient.java index 824485bc6..d12217a96 100644 --- a/src/main/java/com/merge/api/ticketing/RawAccountsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawAccountsClient.java @@ -113,9 +113,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAccountList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedAccountList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAccountList.class); Optional startingAfter = parsedResponse.getNext(); AccountsListRequest nextRequest = AccountsListRequest.builder() .from(request) @@ -128,12 +129,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -185,16 +182,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Account.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Account.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawAsyncPassthroughClient.java b/src/main/java/com/merge/api/ticketing/RawAsyncPassthroughClient.java index 421ecaa11..7671a06a5 100644 --- a/src/main/java/com/merge/api/ticketing/RawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/ticketing/RawAsyncPassthroughClient.java @@ -66,17 +66,14 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AsyncPassthroughReciept.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughReciept.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -111,18 +108,14 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), AsyncPassthroughRetrieveResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AsyncPassthroughRetrieveResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawAttachmentsClient.java b/src/main/java/com/merge/api/ticketing/RawAttachmentsClient.java index 0fc691a0a..9eb300810 100644 --- a/src/main/java/com/merge/api/ticketing/RawAttachmentsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawAttachmentsClient.java @@ -24,9 +24,7 @@ import java.io.IOException; import java.io.InputStream; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -138,9 +136,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAttachmentList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedAttachmentList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAttachmentList.class); Optional startingAfter = parsedResponse.getNext(); AttachmentsListRequest nextRequest = AttachmentsListRequest.builder() .from(request) @@ -154,12 +153,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -188,12 +183,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -210,17 +203,14 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TicketingAttachmentResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TicketingAttachmentResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -276,16 +266,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Attachment.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Attachment.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -339,11 +326,8 @@ public MergeApiHttpResponse downloadRetrieve( return new MergeApiHttpResponse<>(new ResponseBodyInputStream(response), response); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -376,16 +360,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawAuditTrailClient.java b/src/main/java/com/merge/api/ticketing/RawAuditTrailClient.java index 55e794ff6..1b9dbb680 100644 --- a/src/main/java/com/merge/api/ticketing/RawAuditTrailClient.java +++ b/src/main/java/com/merge/api/ticketing/RawAuditTrailClient.java @@ -90,9 +90,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAuditLogEventList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedAuditLogEventList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedAuditLogEventList.class); Optional startingAfter = parsedResponse.getNext(); AuditTrailListRequest nextRequest = AuditTrailListRequest.builder() .from(request) @@ -106,12 +107,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawAvailableActionsClient.java b/src/main/java/com/merge/api/ticketing/RawAvailableActionsClient.java index 32a17d37f..aa9c95de4 100644 --- a/src/main/java/com/merge/api/ticketing/RawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawAvailableActionsClient.java @@ -52,16 +52,13 @@ public MergeApiHttpResponse retrieve(RequestOptions requestOpt } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), AvailableActions.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AvailableActions.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawCollectionsClient.java b/src/main/java/com/merge/api/ticketing/RawCollectionsClient.java index 38810bcd4..29d36bcf5 100644 --- a/src/main/java/com/merge/api/ticketing/RawCollectionsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawCollectionsClient.java @@ -143,9 +143,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedCollectionList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedCollectionList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedCollectionList.class); Optional startingAfter = parsedResponse.getNext(); CollectionsListRequest nextRequest = CollectionsListRequest.builder() .from(request) @@ -159,12 +160,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -237,9 +234,10 @@ public MergeApiHttpResponse> viewersList( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedViewerList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedViewerList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedViewerList.class); Optional startingAfter = parsedResponse.getNext(); CollectionsViewersListRequest nextRequest = CollectionsViewersListRequest.builder() .from(request) @@ -253,12 +251,8 @@ public MergeApiHttpResponse> viewersList( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -322,16 +316,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Collection.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Collection.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawCommentsClient.java b/src/main/java/com/merge/api/ticketing/RawCommentsClient.java index 5c8f80c89..1bf6fbb10 100644 --- a/src/main/java/com/merge/api/ticketing/RawCommentsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawCommentsClient.java @@ -21,9 +21,7 @@ import com.merge.api.ticketing.types.PaginatedCommentList; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -135,9 +133,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedCommentList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedCommentList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedCommentList.class); Optional startingAfter = parsedResponse.getNext(); CommentsListRequest nextRequest = CommentsListRequest.builder() .from(request) @@ -150,12 +149,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -183,12 +178,10 @@ public MergeApiHttpResponse create(CommentEndpointRequest reque QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -205,16 +198,13 @@ public MergeApiHttpResponse create(CommentEndpointRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommentResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommentResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -270,16 +260,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Comment.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Comment.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -312,16 +299,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawContactsClient.java b/src/main/java/com/merge/api/ticketing/RawContactsClient.java index c2da76ae6..b5af377e9 100644 --- a/src/main/java/com/merge/api/ticketing/RawContactsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawContactsClient.java @@ -21,9 +21,7 @@ import com.merge.api.ticketing.types.TicketingContactResponse; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -128,9 +126,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedContactList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedContactList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedContactList.class); Optional startingAfter = parsedResponse.getNext(); ContactsListRequest nextRequest = ContactsListRequest.builder() .from(request) @@ -143,12 +142,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -177,12 +172,10 @@ public MergeApiHttpResponse create( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -199,17 +192,14 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TicketingContactResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TicketingContactResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -265,16 +255,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Contact.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Contact.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -307,16 +294,13 @@ public MergeApiHttpResponse metaPostRetrieve(RequestOptions reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawDeleteAccountClient.java b/src/main/java/com/merge/api/ticketing/RawDeleteAccountClient.java index 43d9fff26..504d01c13 100644 --- a/src/main/java/com/merge/api/ticketing/RawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/ticketing/RawDeleteAccountClient.java @@ -55,11 +55,8 @@ public MergeApiHttpResponse delete(RequestOptions requestOptions) { return new MergeApiHttpResponse<>(null, response); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawFieldMappingClient.java b/src/main/java/com/merge/api/ticketing/RawFieldMappingClient.java index cfcc99a98..abfcf6952 100644 --- a/src/main/java/com/merge/api/ticketing/RawFieldMappingClient.java +++ b/src/main/java/com/merge/api/ticketing/RawFieldMappingClient.java @@ -21,8 +21,6 @@ import com.merge.api.ticketing.types.RemoteFieldApiResponse; import com.merge.api.ticketing.types.RemoteFieldsRetrieveRequest; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -80,18 +78,14 @@ public MergeApiHttpResponse fieldMappingsRetrie } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), FieldMappingApiInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingApiInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -119,17 +113,10 @@ public MergeApiHttpResponse fieldMappingsCreate( request.getExcludeRemoteFieldMetadata().get(), false); } - Map properties = new HashMap<>(); - properties.put("target_field_name", request.getTargetFieldName()); - properties.put("target_field_description", request.getTargetFieldDescription()); - properties.put("remote_field_traversal_path", request.getRemoteFieldTraversalPath()); - properties.put("remote_method", request.getRemoteMethod()); - properties.put("remote_url_path", request.getRemoteUrlPath()); - properties.put("common_model_name", request.getCommonModelName()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -146,17 +133,14 @@ public MergeApiHttpResponse fieldMappingsCreate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -191,17 +175,14 @@ public MergeApiHttpResponse fieldMappingsDestroy( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -253,17 +234,14 @@ public MergeApiHttpResponse fieldMappingsPartialUp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), FieldMappingInstanceResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, FieldMappingInstanceResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -314,17 +292,14 @@ public MergeApiHttpResponse remoteFieldsRetrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteFieldApiResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -357,18 +332,14 @@ public MergeApiHttpResponse targetFieldsRetrieve } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), ExternalTargetFieldApiResponse.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ExternalTargetFieldApiResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawForceResyncClient.java b/src/main/java/com/merge/api/ticketing/RawForceResyncClient.java index f1a9e59f7..ccb5834ac 100644 --- a/src/main/java/com/merge/api/ticketing/RawForceResyncClient.java +++ b/src/main/java/com/merge/api/ticketing/RawForceResyncClient.java @@ -55,18 +55,15 @@ public MergeApiHttpResponse> syncStatusResyncCreate(RequestOpti } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawGenerateKeyClient.java b/src/main/java/com/merge/api/ticketing/RawGenerateKeyClient.java index b264614e2..deae19cc2 100644 --- a/src/main/java/com/merge/api/ticketing/RawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/ticketing/RawGenerateKeyClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request, } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawIssuesClient.java b/src/main/java/com/merge/api/ticketing/RawIssuesClient.java index 75e4f2080..be461a534 100644 --- a/src/main/java/com/merge/api/ticketing/RawIssuesClient.java +++ b/src/main/java/com/merge/api/ticketing/RawIssuesClient.java @@ -137,9 +137,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedIssueList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedIssueList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedIssueList.class); Optional startingAfter = parsedResponse.getNext(); IssuesListRequest nextRequest = IssuesListRequest.builder() .from(request) @@ -152,12 +153,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -191,16 +188,13 @@ public MergeApiHttpResponse retrieve(String id, RequestOptions requestOpt } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Issue.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Issue.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawLinkTokenClient.java b/src/main/java/com/merge/api/ticketing/RawLinkTokenClient.java index f6d77aaa0..215c7704e 100644 --- a/src/main/java/com/merge/api/ticketing/RawLinkTokenClient.java +++ b/src/main/java/com/merge/api/ticketing/RawLinkTokenClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(EndUserDetailsRequest request, Req } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), LinkToken.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, LinkToken.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawLinkedAccountsClient.java b/src/main/java/com/merge/api/ticketing/RawLinkedAccountsClient.java index fb5351db3..b03fb6d61 100644 --- a/src/main/java/com/merge/api/ticketing/RawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawLinkedAccountsClient.java @@ -128,9 +128,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedAccountDetailsAndActionsList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedAccountDetailsAndActionsList.class); + responseBodyString, PaginatedAccountDetailsAndActionsList.class); Optional startingAfter = parsedResponse.getNext(); LinkedAccountsListRequest nextRequest = LinkedAccountsListRequest.builder() .from(request) @@ -145,12 +146,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawPassthroughClient.java b/src/main/java/com/merge/api/ticketing/RawPassthroughClient.java index 6d58f4933..7bdd67045 100644 --- a/src/main/java/com/merge/api/ticketing/RawPassthroughClient.java +++ b/src/main/java/com/merge/api/ticketing/RawPassthroughClient.java @@ -64,16 +64,13 @@ public MergeApiHttpResponse create(DataPassthroughRequest reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawProjectsClient.java b/src/main/java/com/merge/api/ticketing/RawProjectsClient.java index c982151d7..a85aca7f8 100644 --- a/src/main/java/com/merge/api/ticketing/RawProjectsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawProjectsClient.java @@ -116,9 +116,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedProjectList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedProjectList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedProjectList.class); Optional startingAfter = parsedResponse.getNext(); ProjectsListRequest nextRequest = ProjectsListRequest.builder() .from(request) @@ -131,12 +132,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -188,16 +185,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Project.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Project.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -269,9 +263,10 @@ public MergeApiHttpResponse> usersList( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedUserList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedUserList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedUserList.class); Optional startingAfter = parsedResponse.getNext(); ProjectsUsersListRequest nextRequest = ProjectsUsersListRequest.builder() .from(request) @@ -284,12 +279,8 @@ public MergeApiHttpResponse> usersList( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawRegenerateKeyClient.java b/src/main/java/com/merge/api/ticketing/RawRegenerateKeyClient.java index 279abd171..58c9b52d7 100644 --- a/src/main/java/com/merge/api/ticketing/RawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/ticketing/RawRegenerateKeyClient.java @@ -65,16 +65,13 @@ public MergeApiHttpResponse create( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RemoteKey.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, RemoteKey.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawRolesClient.java b/src/main/java/com/merge/api/ticketing/RawRolesClient.java index 70138aec1..1e7ea43fc 100644 --- a/src/main/java/com/merge/api/ticketing/RawRolesClient.java +++ b/src/main/java/com/merge/api/ticketing/RawRolesClient.java @@ -113,9 +113,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRoleList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRoleList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRoleList.class); Optional startingAfter = parsedResponse.getNext(); RolesListRequest nextRequest = RolesListRequest.builder() .from(request) @@ -128,12 +129,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -184,16 +181,13 @@ public MergeApiHttpResponse retrieve(String id, RolesRetrieveRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Role.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Role.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawScopesClient.java b/src/main/java/com/merge/api/ticketing/RawScopesClient.java index 79fcb031d..0100ccac2 100644 --- a/src/main/java/com/merge/api/ticketing/RawScopesClient.java +++ b/src/main/java/com/merge/api/ticketing/RawScopesClient.java @@ -56,17 +56,13 @@ public MergeApiHttpResponse defaultScopesRetrieve(RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -99,17 +95,13 @@ public MergeApiHttpResponse linkedAccountScopesRetrieve(Req } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -152,17 +144,13 @@ public MergeApiHttpResponse linkedAccountScopesCreate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CommonModelScopeApi.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CommonModelScopeApi.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawSyncStatusClient.java b/src/main/java/com/merge/api/ticketing/RawSyncStatusClient.java index 9805b9a3d..da524b789 100644 --- a/src/main/java/com/merge/api/ticketing/RawSyncStatusClient.java +++ b/src/main/java/com/merge/api/ticketing/RawSyncStatusClient.java @@ -74,9 +74,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedSyncStatusList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedSyncStatusList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedSyncStatusList.class); Optional startingAfter = parsedResponse.getNext(); SyncStatusListRequest nextRequest = SyncStatusListRequest.builder() .from(request) @@ -90,12 +91,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawTagsClient.java b/src/main/java/com/merge/api/ticketing/RawTagsClient.java index 97e639a08..208ebe674 100644 --- a/src/main/java/com/merge/api/ticketing/RawTagsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawTagsClient.java @@ -112,9 +112,10 @@ public MergeApiHttpResponse> list(TagsListRequest reques } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTagList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTagList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTagList.class); Optional startingAfter = parsedResponse.getNext(); TagsListRequest nextRequest = TagsListRequest.builder() .from(request) @@ -127,12 +128,8 @@ public MergeApiHttpResponse> list(TagsListRequest reques .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -183,16 +180,13 @@ public MergeApiHttpResponse retrieve(String id, TagsRetrieveRequest request } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Tag.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Tag.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawTeamsClient.java b/src/main/java/com/merge/api/ticketing/RawTeamsClient.java index 0a79ef5e2..1f7bb3dae 100644 --- a/src/main/java/com/merge/api/ticketing/RawTeamsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawTeamsClient.java @@ -113,9 +113,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTeamList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTeamList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTeamList.class); Optional startingAfter = parsedResponse.getNext(); TeamsListRequest nextRequest = TeamsListRequest.builder() .from(request) @@ -128,12 +129,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -184,16 +181,13 @@ public MergeApiHttpResponse retrieve(String id, TeamsRetrieveRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Team.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Team.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawTicketsClient.java b/src/main/java/com/merge/api/ticketing/RawTicketsClient.java index e086ab951..370900cfd 100644 --- a/src/main/java/com/merge/api/ticketing/RawTicketsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawTicketsClient.java @@ -29,9 +29,7 @@ import com.merge.api.ticketing.types.Viewer; import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -243,9 +241,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedTicketList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedTicketList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedTicketList.class); Optional startingAfter = parsedResponse.getNext(); TicketsListRequest nextRequest = TicketsListRequest.builder() .from(request) @@ -258,12 +257,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -291,12 +286,10 @@ public MergeApiHttpResponse create(TicketEndpointRequest request QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -313,16 +306,13 @@ public MergeApiHttpResponse create(TicketEndpointRequest request } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TicketResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TicketResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -393,16 +383,13 @@ public MergeApiHttpResponse retrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Ticket.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Ticket.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -432,12 +419,10 @@ public MergeApiHttpResponse partialUpdate( QueryStringMapper.addQueryParameter( httpUrl, "run_async", request.getRunAsync().get(), false); } - Map properties = new HashMap<>(); - properties.put("model", request.getModel()); RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -454,16 +439,13 @@ public MergeApiHttpResponse partialUpdate( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), TicketResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, TicketResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -536,9 +518,10 @@ public MergeApiHttpResponse> viewersList( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedViewerList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedViewerList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedViewerList.class); Optional startingAfter = parsedResponse.getNext(); TicketsViewersListRequest nextRequest = TicketsViewersListRequest.builder() .from(request) @@ -552,12 +535,8 @@ public MergeApiHttpResponse> viewersList( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -591,16 +570,13 @@ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -648,16 +624,13 @@ public MergeApiHttpResponse metaPostRetrieve( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, MetaResponse.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -739,9 +712,10 @@ public MergeApiHttpResponse> remoteFieldCla } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedRemoteFieldClassList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedRemoteFieldClassList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedRemoteFieldClassList.class); Optional startingAfter = parsedResponse.getNext(); TicketsRemoteFieldClassesListRequest nextRequest = TicketsRemoteFieldClassesListRequest.builder() .from(request) @@ -755,12 +729,8 @@ public MergeApiHttpResponse> remoteFieldCla .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawUsersClient.java b/src/main/java/com/merge/api/ticketing/RawUsersClient.java index 1f3a380ac..8654db133 100644 --- a/src/main/java/com/merge/api/ticketing/RawUsersClient.java +++ b/src/main/java/com/merge/api/ticketing/RawUsersClient.java @@ -125,9 +125,10 @@ public MergeApiHttpResponse> list( } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { PaginatedUserList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedUserList.class); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, PaginatedUserList.class); Optional startingAfter = parsedResponse.getNext(); UsersListRequest nextRequest = UsersListRequest.builder() .from(request) @@ -140,12 +141,8 @@ public MergeApiHttpResponse> list( .body()), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -200,16 +197,13 @@ public MergeApiHttpResponse retrieve(String id, UsersRetrieveRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), User.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, User.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/RawWebhookReceiversClient.java b/src/main/java/com/merge/api/ticketing/RawWebhookReceiversClient.java index 77b889e74..2c1e29546 100644 --- a/src/main/java/com/merge/api/ticketing/RawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/ticketing/RawWebhookReceiversClient.java @@ -58,18 +58,15 @@ public MergeApiHttpResponse> list(RequestOptions requestOp } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), new TypeReference>() {}), + responseBodyString, new TypeReference>() {}), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } @@ -110,16 +107,13 @@ public MergeApiHttpResponse create(WebhookReceiverRequest reque } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new MergeApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), WebhookReceiver.class), response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, WebhookReceiver.class), response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new ApiError( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response); + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ApiError("Error with status code " + response.code(), response.code(), errorBody, response); } catch (IOException e) { throw new MergeException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/merge/api/ticketing/types/RemoteData.java b/src/main/java/com/merge/api/ticketing/types/RemoteData.java index 5534766b0..a5d811d2d 100644 --- a/src/main/java/com/merge/api/ticketing/types/RemoteData.java +++ b/src/main/java/com/merge/api/ticketing/types/RemoteData.java @@ -42,6 +42,9 @@ public String getPath() { return path; } + /** + * @return The data returned from the third-party for this object in its original, unnormalized format. + */ @JsonProperty("data") public Optional getData() { return data; @@ -88,6 +91,9 @@ public interface PathStage { public interface _FinalStage { RemoteData build(); + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ */ _FinalStage data(Optional data); _FinalStage data(JsonNode data); @@ -123,12 +129,19 @@ public _FinalStage path(@NotNull String path) { return this; } + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage data(JsonNode data) { this.data = Optional.ofNullable(data); return this; } + /** + *

The data returned from the third-party for this object in its original, unnormalized format.

+ */ @java.lang.Override @JsonSetter(value = "data", nulls = Nulls.SKIP) public _FinalStage data(Optional data) { diff --git a/src/main/java/com/merge/legacy/api/core/InputStreamRequestBody.java b/src/main/java/com/merge/legacy/api/core/InputStreamRequestBody.java index 3751c4327..ba30a6f3c 100644 --- a/src/main/java/com/merge/legacy/api/core/InputStreamRequestBody.java +++ b/src/main/java/com/merge/legacy/api/core/InputStreamRequestBody.java @@ -8,7 +8,6 @@ import java.util.Objects; import okhttp3.MediaType; import okhttp3.RequestBody; -import okhttp3.internal.Util; import okio.BufferedSink; import okio.Okio; import okio.Source; @@ -68,12 +67,8 @@ public long contentLength() throws IOException { */ @Override public void writeTo(BufferedSink sink) throws IOException { - Source source = null; - try { - source = Okio.source(inputStream); + try (Source source = Okio.source(inputStream)) { sink.writeAll(source); - } finally { - Util.closeQuietly(Objects.requireNonNull(source)); } } } diff --git a/src/test/java/com/merge/api/StreamTest.java b/src/test/java/com/merge/api/StreamTest.java index 4872aa373..99a3fbd5e 100644 --- a/src/test/java/com/merge/api/StreamTest.java +++ b/src/test/java/com/merge/api/StreamTest.java @@ -9,6 +9,9 @@ import com.merge.api.core.Stream; import java.io.IOException; import java.io.StringReader; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -17,8 +20,9 @@ public final class StreamTest { @Test public void testJsonStream() { - List messages = List.of(Map.of("message", "hello"), Map.of("message", "world")); - List jsonStrings = messages.stream().map(StreamTest::mapToJson).collect(Collectors.toList()); + List> messages = + Arrays.asList(createMap("message", "hello"), createMap("message", "world")); + List jsonStrings = messages.stream().map(StreamTest::mapToJson).collect(Collectors.toList()); String input = String.join("\n", jsonStrings); StringReader jsonInput = new StringReader(input); Stream jsonStream = Stream.fromJson(Map.class, jsonInput); @@ -33,8 +37,8 @@ public void testJsonStream() { @Test public void testSseStream() { - List events = List.of(Map.of("event", "start"), Map.of("event", "end")); - List sseStrings = events.stream().map(StreamTest::mapToSse).collect(Collectors.toList()); + List> events = Arrays.asList(createMap("event", "start"), createMap("event", "end")); + List sseStrings = events.stream().map(StreamTest::mapToSse).collect(Collectors.toList()); String input = String.join("\n" + "\n", sseStrings); StringReader sseInput = new StringReader(input); Stream sseStream = Stream.fromSse(Map.class, sseInput); @@ -49,8 +53,9 @@ public void testSseStream() { @Test public void testSseStreamWithTerminator() { - List events = List.of(Map.of("message", "first"), Map.of("message", "second")); - List sseStrings = events.stream().map(StreamTest::mapToSse).collect(Collectors.toList()); + List> events = Arrays.asList(createMap("message", "first"), createMap("message", "second")); + List sseStrings = + new ArrayList<>(events.stream().map(StreamTest::mapToSse).collect(Collectors.toList())); sseStrings.add("data: [DONE]"); String input = String.join("\n" + "\n", sseStrings); StringReader sseInput = new StringReader(input); @@ -83,4 +88,10 @@ private static String mapToJson(Map map) { private static String mapToSse(Map map) { return "data: " + mapToJson(map); } + + private static Map createMap(String key, String value) { + Map map = new HashMap<>(); + map.put(key, value); + return map; + } }